Profiling Debug vs. Release builds

Memory profiling for .NET developers

Profiling Debug vs. Release builds

Postby flipdoubt » Tue Aug 11, 2009 2:34 pm

Does profiling a Debug vs. Release build affect memory profiling results?
Posts: 10
Joined: Tue Aug 11, 2009 2:32 pm

Postby AndrewH » Wed Aug 12, 2009 10:40 am

The answer is 'it depends', but in general the differences will be minor enough not to be significant.

It's possible a debug build will use extra debugging code which will allocate more objects, but usually this will be an insignificant amount of extra objects.

It's also possible that optimisations in the code will mean that some objects can be garbage collected sooner in release builds, but once again in most cases the effect will be insignificant. In debug builds, local variables are kept around for as long as a method is running so they can be inspected by the debugger but in release builds they may be destroyed early.
Andrew Hunter
Software Developer
Red Gate Software Ltd.
Posts: 118
Joined: Thu Aug 17, 2006 2:44 pm

Postby flipdoubt » Wed Aug 12, 2009 4:42 pm

Thanks. I am a new user liking this product a lot. About to ask another question ...
Posts: 10
Joined: Tue Aug 11, 2009 2:32 pm

Return to ANTS Memory Profiler Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests