Hi Admin,
We have been using this .net memory profiler for a while. Recently, we started the optimization cycle and when we started profiling the application. We have noticed some unexpected behavior
This is what is happening:
When I close the view , the actual view gets removed from the memory .But, the constructor still retains in the memory after clean is done.
Can you please review and suggest the needful
Thanks,
Bhargava
clean up does not clean constructor
-
- Posts:9
- Joined:Thu Jun 04, 2015 8:44 pm
-
- Posts:1043
- Joined:Wed Mar 02, 2005 7:53 pm
Re: clean up does not clean constructor
The MainPage.c<> class is not the view constructor. It's a helper class created by the compiler to implement anonymous delegates. Only one instance of this class will be created, and it will not be GCed until the AppDomain shuts down (it has a static field reference as a root). The size of the instance is only 12 bytes and since only one instance gets created, it's not a memory leak, just an implementation detail.
I hope this helps.
I hope this helps.
Best regards,
Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
SciTech Software AB
-
- Posts:9
- Joined:Thu Jun 04, 2015 8:44 pm
Who is online
Users browsing this forum: No registered users and 11 guests