[Insight-developers] memory leaks and ProcessObject::UnRegister()

Lydia Ng lng at statsci.com
Tue Nov 28 15:03:18 EST 2000


Hi,

I was trying to build a application
using itk and noticed I was getting memory
leakage. 

I tracked it down to ProcessObject::UnRegister()
which currently does nothing.

In my application, I create a new filter via New()
and get a smartpointer to it. When my smartpointer
goes out of scope, I presume it should also delete
my filter since there is no other references to it.

Because ProcessObject::UnRegister() does nothing
the destructor for the filter is never called 
and hence the memory leak.

Should ProcessObject::UnRegister() do something
similar to DataObject::UnRegister() which eventually
activates a delete, or should I be cleaning up
my filter some other way?

Lydia





More information about the Insight-developers mailing list