[Insight-users] How to build a sub class of itk::XMLReaderBase...??
Sergio Andrés
seanru_nigu at yahoo . es
Fri, 19 Sep 2003 13:38:42 +0200 (CEST)
Hi everybody again!
I want to create a new class that inherits from itk::XMLReaderBase.
But, I have some problems with destructors:
1. I create a new instance of my class with "MyClass * pt = new MyClass();"
2. I use my class...
3. I try to delete the pointer pt with "delete pt".
But I get a run-time error.
I think it could be due to the way I defined MyClass, with public constructor
and destructor....
However, if I call to "pt->UnRegister();" instead of "delete pt", the program
finishes correctly, provided that the destructor method in MyClass is empty.
Could anyone help me with this problem...??
Should I define MyClass with a style like ITK classes (SmartPointers,
static New methods ...) ???
Thanks in advance...!!
Sergio.
___________________________________________________
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger . yahoo . es