Red Gate forums :: View topic - Snapshot forcing garbage collection
Return to www.red-gate.com RSS Feed Available

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

Snapshot forcing garbage collection

Search in ANTS Memory Profiler 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
rbeaver@emphasys-software



Joined: 24 Apr 2013
Posts: 2

PostPosted: Wed Apr 24, 2013 4:51 pm    Post subject: Snapshot forcing garbage collection Reply with quote

I've been recently assigned to a fairly large WPF based ERP system. We're having some memory issues in the application and memory profiler has proved fairly invaluable. That being said, I'm seeing some odd behavior.

We have one page that loads an enormous amount of records, so I take a snapshot before load and after load. There is a difference of about 80mb between the two states. After leaving the page, on the page unload method we explicitly clear both the grid and the observablecollection that holds these records. Yet, the memory profiler still shows a large amount of memory being used by this page. I thought it might simply be a case of the garbage collector not yet being called so I've waited it out several minutes during testing.

The crazy thing is, as soon as I do a snapshot, the memory usage drops to what I think it should be, every time. I even validated it against the resource monitor. I know how crazy this sounds, but does anyone have any ideas as to why this would be happening?

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



Joined: 12 Mar 2009
Posts: 585

PostPosted: Thu Apr 25, 2013 5:26 pm    Post subject: Reply with quote

Snapshot= GC.Collect() Smile
Back to top
View user's profile Send private message
rbeaver@emphasys-software



Joined: 24 Apr 2013
Posts: 2

PostPosted: Wed May 01, 2013 12:40 pm    Post subject: Huh Reply with quote

Well that explains it, thanks Chris!

Ryan
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