VTK DEBUG_LEAKS=ON under Release build

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

VTK DEBUG_LEAKS=ON under Release build

Patrick Cheng
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


_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: VTK DEBUG_LEAKS=ON under Release build

Patrick Cheng
BTW: I am using Visual Studio .net 2003


Patrick Cheng wrote:

> 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
>
>
>
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers