[vtkusers] DebugLeaks in MS .net 2003

de Boer Ingo I.deBoer at polytec.de
Fri Jan 9 07:00:47 EST 2004


Hi all,

I am using MS .net 2003 with VTK 4.2.5.
In MS .net 2002 there were no problems with my code!!
Now, when my application exits I get a memory leakage message:

vtkDebugLeaks has detected LEAKS!
Class vtkObjectFactoryCollection has 1 instance still around.
Class vtkMyInteractorStyle has 1 instance still around.
Class vtkInteractorStyleTrackballCamerahas -1 instance still around.

Where vtkMyInteractorStyle is my own class (see below)
If I remove vtkMyInteractorStyle from my application I get

vtkDebugLeaks has detected LEAKS!
Class vtkObjectFactoryCollection has 1 instance still around.

Now, when I set the compiler option in the vtkCommon project
from "Maximize Speed (/O2)" to "Disabled (/Od)" the leakage 
disappears !! Something seems to be optimized which shouldn't be.
This only happens in Release code and only the vtkCommon project
has to be changed.

Did I miss someting in my vtkMyInteractorStyle class ? Has anybody
experienced the same ? Where does vtkObjectFactoryCollection come
from ?

greets
  Ingo

---
Dr.-Ing. Ingo H. de Boer

Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax  : ++49 7243 604 255

#########################
class vtkMyInteractorStyle : public vtkInteractorStyleTrackballCamera
{
public:
	static vtkMyInteractorStyle *New();

protected:
	vtkMyInteractorStyle();
	~vtkMyInteractorStyle();
};

vtkStandardNewMacro(vtkMyInteractorStyle);

vtkMyInteractorStyle::vtkMyInteractorStyle() : vtkInteractorStyleTrackballCamera()
{
}

vtkMyInteractorStyle::~vtkMyInteractorStyle()
{
}



More information about the vtkusers mailing list