Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. out of memory !

out of memory !

Scheduled Pinned Locked Moved C#
databasecsharpperformancehelp
6 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mersad00
    wrote on last edited by
    #1

    hi there! i have a big problem with memory releasing in c#, let me explain u my case: i have a sql class (sqlconnection+ sqlDataAdapter )which fill a DataTable that contains about 34000 rows, now the memory consumtion goes up about twice than before query executed! but the problem is when user closes the host form, memory would not be released compeletly! so after 3 or 4 time execution, application stopped working and out of memory exception! I tried this solutions: Disposing Table- GC.Finalize- GC.Collect and so but they wont return whole of memory... plz HELPPPPP

    G P realJSOPR D 4 Replies Last reply
    0
    • M mersad00

      hi there! i have a big problem with memory releasing in c#, let me explain u my case: i have a sql class (sqlconnection+ sqlDataAdapter )which fill a DataTable that contains about 34000 rows, now the memory consumtion goes up about twice than before query executed! but the problem is when user closes the host form, memory would not be released compeletly! so after 3 or 4 time execution, application stopped working and out of memory exception! I tried this solutions: Disposing Table- GC.Finalize- GC.Collect and so but they wont return whole of memory... plz HELPPPPP

      G Offline
      G Offline
      GParkings
      wrote on last edited by
      #2

      It might be worth checking out the redgate memory profiler: http://www.red-gate.com/products/dotnet-development/ants-memory-profiler/ its what i normally use to find those elusive memory leaks There is a free trial

      Pedis ex oris

      1 Reply Last reply
      0
      • M mersad00

        hi there! i have a big problem with memory releasing in c#, let me explain u my case: i have a sql class (sqlconnection+ sqlDataAdapter )which fill a DataTable that contains about 34000 rows, now the memory consumtion goes up about twice than before query executed! but the problem is when user closes the host form, memory would not be released compeletly! so after 3 or 4 time execution, application stopped working and out of memory exception! I tried this solutions: Disposing Table- GC.Finalize- GC.Collect and so but they wont return whole of memory... plz HELPPPPP

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        Well, it sounds like your DataTable can't be garbage collected. That indicates that you have a hard reference to it from outside the form that the user closed.

        Forgive your enemies - it messes with their heads

        My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

        1 Reply Last reply
        0
        • M mersad00

          hi there! i have a big problem with memory releasing in c#, let me explain u my case: i have a sql class (sqlconnection+ sqlDataAdapter )which fill a DataTable that contains about 34000 rows, now the memory consumtion goes up about twice than before query executed! but the problem is when user closes the host form, memory would not be released compeletly! so after 3 or 4 time execution, application stopped working and out of memory exception! I tried this solutions: Disposing Table- GC.Finalize- GC.Collect and so but they wont return whole of memory... plz HELPPPPP

          realJSOPR Offline
          realJSOPR Offline
          realJSOP
          wrote on last edited by
          #4

          Learn how to use google: Investigating Memory Issues[^]

          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
          -----
          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
          -----
          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

          L 1 Reply Last reply
          0
          • realJSOPR realJSOP

            Learn how to use google: Investigating Memory Issues[^]

            ".45 ACP - because shooting twice is just silly" - JSOP, 2010
            -----
            You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
            -----
            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            John Simmons / outlaw programmer wrote:

            Investigating Memory Issues[^]

            FTFY! If you want them to learn how to google you have to hold their hand ;)

            Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

            1 Reply Last reply
            0
            • M mersad00

              hi there! i have a big problem with memory releasing in c#, let me explain u my case: i have a sql class (sqlconnection+ sqlDataAdapter )which fill a DataTable that contains about 34000 rows, now the memory consumtion goes up about twice than before query executed! but the problem is when user closes the host form, memory would not be released compeletly! so after 3 or 4 time execution, application stopped working and out of memory exception! I tried this solutions: Disposing Table- GC.Finalize- GC.Collect and so but they wont return whole of memory... plz HELPPPPP

              D Offline
              D Offline
              Daniel Grondal
              wrote on last edited by
              #6

              Garbage collection is probably not the answer to your question. Something is most likely holding on to your references, making it impossible to collect as garbage, even if you call Dispose(). I would use a memory profiler to find out. CLR profiler is free and easy to use. It can be found at Microsofts website: http://www.microsoft.com/download/en/details.aspx?id=16273[^]

              //daniel

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups