[IGSTK-Developers] VTK DEBUG_LEAKS=ON under Release build

Patrick Cheng cheng at isis.georgetown.edu
Tue Jan 24 16:17:01 EST 2006


Hi everybody,

I am using VTK cvs version compiled under 'Release' with DEBUG_LEAKS on.

This cause all my IGSTK classes which use VTK object inside failed with 
the following or some other similar reference counting error messages.

Class "vtkObjectFactoryCollection" has 1 instance still around.

This does not happen to the 'Debug' build.

I guess one big difference between the 'Debug' and 'Release' build 
during the compilation is the optimization.

So I change the optimization flag for the 'Release' build of vtkCommon 
project from /O2 to /Od

/O2 : Optimization Disabled
/O2 : Maximize Speed

I compile the vtkCommon again, and build the IGSTK program again. All 
the error messages are gone.

Could anyone explain to me why is the vtkObjectFactory code behaving 
like this? What does the optimization during the compilation do? Could 
something go wrong during the optimization?

Patrick





More information about the IGSTK-Developers mailing list