c# - large MVP application memory leak when opening / closing form -
i'm working @ project (constructed on mvp architecture) has memory leaks. application using 1gb of memory list of records displaying in grid.
i profiled (took 2 memory snapshots) @ these 2 moments: 1. before opening page loads data db (memory usage = 400 mb) 2. when closing page
when closing page memory usage stays same (around 1 gb), when should @ least drop (ideally should @ 400 mb gc can't controlled...can it?). tried control process's memory usage this:
process.getcurrentprocess().maxworkingset = new intptr(1000000);
and intend on using thing:
setprocessworkingsetsize(intptr handle, intptr min, intptr max)
but further try optimize code , don't know how. edit post lots of code soon, don't -1...it
check if objects getting created in large objects heap (loh). check event subscriptions too. refer http://msdn.microsoft.com/en-us/magazine/cc534993.aspx
Comments
Post a Comment