out of memory !
-
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
-
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
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
-
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
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
-
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
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 -
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, 1997John Simmons / outlaw programmer wrote:
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.
-
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
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