Today I have been using Ants Memory Profiler 5 extensively, and have 2 observations. I'm not an expert in this field so please forgive my naivety.
1) I would like the Namespace/Class filter combo to retain the value entered between snapshots. Currently every time I take a new snapshot the combo is emptied.
2) I have hit many reported leaks, that are really not leaks, but just pending Garbage Collection. I know this is documented, but it would be nice to have Ants do several GC's before collecting the snapshot. Allow me to (try to) explain. In my program I have an administrative function that does a GC on demand. If I use this option *before* taking a snapshot I don't get any false positives. I'm wondering if my objects are getting promoted to the next GC level with my code, and when Ants does it's own GC it finally collects these recently promoted items and cleans them up before the snapshot. This is the code I execute from within my program:
- Code: Select all
I am not an expert in this field by any stretch of the imagination, but it seems strange that when I execute this code, all the 'Objects on finalizer queue but not disposed' disappear.
Could Ants be made to do this prior to snapshot collection?