New Object Filter

Memory profiling for .NET developers

Moderators: Luke Jefferson, StephenC, AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

New Object Filter

Postby aaronkupen » Fri May 10, 2013 5:11 pm

I'm currently trying to use this memory profiling software to determine the memory characteristics of some software that needs to have as close to 24/7 up-time as possible. I'm noticing some quirks when I try to do analysis using the "new object" filter.

What does it truly mean to be a new object? I'm aware of the context behind "new" when it comes to snapshots: if it wasn't in the baseline snapshot but exists in the current snapshot, then it is "new". But this doesn't necessarily seem to be working properly from my experience.

My procedure/scenario that I use to see this is as follows:

1) In my software I have a network object that gets created whenever a client connects to my service, creating the new network object on my service. The memory profiling software sees this and displays this behavior correctly.

2) After several minutes of idle time, and I can confirm that nothing is happening on the application level of my software, I take another snapshot and it correctly shows that no new objects were being created.

3) After another several minutes of idle time, I see that a new network object was created according to the memory profiler. My old one is no longer in the "surviving objects" filter. How can this be explained assuming that I am NOT instantiated a new networking object in my code?

I have logging statements in my constructor that explicitly lets me know when these objects have been instantiated, and when I see the newly created object I am not seeing these logging statements. I'm 100% positive that my application code is idle and is not instantiating these or any other new objects during this time period.

I've seen this with other classes in other projects as well and have always ignored it until now. Back to my original question, does "new" in the context of snapshots mean "instantiated" during these snapshots? From what I am seeing, it definitely does not mean this. How can I interpret this? If it doesn't mean instantiated, then what actually does it mean? Under what circumstances can this happen?
aaronkupen
 
Posts: 3
Joined: Thu Apr 04, 2013 5:45 pm

Postby james.billings » Mon May 13, 2013 1:02 pm

Thanks for your post. On the face of it, I'm not sure what would be happening here. According to the documentation, "New" is shown when the object in question is new between the two snapshots you're working with (not necessarily the baseline).

From your description then, it either sounds like we're spuriously detecting a new object when it's not actually the case, or something is triggering a new object to be created outside of your test processes.

I had a quick check in our bugtracker, and the behaviour you describe isn't currently listed as a known problem as far as I can see. Is it possible for you to recreate the problem in a smaller test-case (or are we able to obtain a copy of your application to test here?) If we can reproduce the same behaviour then I'm happy to log a bug and/or explain what's occurring
james.billings
 
Posts: 1146
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to ANTS Memory Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests