My concern here is: You do memory leak detection for *some* special
classes and don't find *other* leaks.

Is this really what you want to do?

On Windows, you don't have to do specials builds just for finding memory
leaks. You can use free MS tools UMDH or LeakDiag, or commercial tools
like BoundsChecker.

I am quite sure you don't have to do anything special on Linux, when
using Valgrind....

With your suggested solution, you might see that some *special* objects
are leaking.
But then?
You can't use the debugger and follow all CTOR/DTOR calls, at least not
for mass objects.

Your solution will not provide stacktraces (point of allocation) for
objects which where not freed.
External tools will do so.

Malte.


Frank Schönheit wrote:
> Hi Malte,
> 
> 
>>We should talk about the LeakGuard when consolidating the debug macros,
>>as Frank suggested.
>>
>>Please don't introduce before.
> 
> 
> Uh. Let's not wait for something which perhaps happens in 2007.
> Introduce it when it's there, and when it's needed: now.
> 
> 
>>I also suggest to have a macro for it, which simply expands to nothing
>>in product builds.
> 
> 
> Why? The solution to derive from this class seems pretty elegant to me,
> I don't see a need for a macro here.
> 
> 
>>If we do anything in this direction, I think it shouldn't be only leak
>>detection, but statistics and logging too.
> 
> 
> I have to agree to Daniel here that we perhaps shouldn't necessarily mix
> *all* this into *one* class. A LeakGuard should be about leak detection.
> IMO, this includes statistics about leaked objects, but excludes
> statistics about instance counts or so.
> 
> 
>>For leak detection, there are enough tools which don't require any code
>>changes.
> 
> 
> But they require code instrumentation, don't they?
> I like the idea of having a tool which is enabled in non-product builds
> *by default*, enabling *everybody* (including QA) to check for leaks
> without any additional effort.
> 
> Ciao
> Frank
> 
> PS: please don't reply-all when reading/writing via a newsgroup-gateway.
> This results in your message being duplicated in the mailing list. Thanks.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to