Red Gate forums :: View topic - how does MemoryProfiler accomplish it?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Memory Profiler 8
ANTS Memory Profiler 8 forum

how does MemoryProfiler accomplish it?

Search in ANTS Memory Profiler 8 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Christian



Joined: 13 Dec 2013
Posts: 2

PostPosted: Fri Dec 13, 2013 12:19 pm    Post subject: how does MemoryProfiler accomplish it? Reply with quote

Hi,

our application is allocating objects which are stored in strong and weak references. we need to so some cleanup when objects are destroyed. after all strong references are released, objects still stays in memory (-> bad).
calling GC.Collect() does not help
when I use MemoryProfiler and press 'Take memory snapshot' the objects are destroyed immediately

we don't want to make these objects disposable

Is there something special what MemoryProfiler does to accomplish objects are destroyed (what we are not able to)?

Thanks,
Christian
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 585

PostPosted: Mon Dec 16, 2013 2:44 pm    Post subject: Reply with quote

I have it on extremely good authority that the snapshot does:

GC.Collect();

and then gathers all the data.

I cannot account for why this doesn't have the same effect with your code. If we (support@red-gate.com) can get hold of the same code, we will be able to comment further.
Back to top
View user's profile Send private message
Christian



Joined: 13 Dec 2013
Posts: 2

PostPosted: Tue Dec 17, 2013 10:13 am    Post subject: Reply with quote

Chris,

thanks for your feedback and the insight. this is something we tried already, but didn't work.

providing you with the code or a code sample is unfortunately not possible.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group