.NET Memory Problems

  • Thread starter Thread starter Prasad Dannani
  • Start date Start date
P

Prasad Dannani

HI,

I am a C#.NET Developer.
I created a windows application which is taking too much memory. But my code
is calling dispose methods of all objects and assigning null them.
I don't know why is it happening After that i tried the GC methods it worked
for me in the first instance but from the next time onwards its not working.
I don't why.

Can any one help on how to clear the memory immediately after completely
using of an object.

Thanks in Advance
Prasad Dannani
 
OK. What you really need is a memory profiling tool. There are memory
monitoring tools built into XP and the other OS's which you can access
through PerfMon. If you have to explicitly call GC to clean up then there is
something definitely wrong. You should never really explicitly call that in
your code. Use PerfMon to see where your memory is getting tied up. Meaning
which generation is using up all the memory. Strings are a big source of
memory leaks. Make sure that you are using the StringBuilder object to
concatenate strings instead of the "+".
 
I want to know which object is not getting disposed. Is it possible through
PerfMon. can you suggest any link which explains better use of it.
Is there any other alternative other than PerfMon.

Prasad Dannani
 
Use at least CLRProfiler from MS.

HTH
Alex

Prasad Dannani said:
I want to know which object is not getting disposed. Is it possible through
PerfMon. can you suggest any link which explains better use of it.
Is there any other alternative other than PerfMon.

Prasad Dannani

there my
 
first of all thanks for suggesting a good Application. It is fine and easy
to understand.

inbetween its giving some runtime errors. but overall its a good tool.

Thanks
Prasad Dannani
 
Back
Top