[Insight-developers] Why does ObjectFactoryBase::CreateInstance call o->Register() for objects it creates?
Williams, Norman K
norman-k-williams at uiowa.edu
Tue Aug 9 17:32:19 EDT 2011
OK here's a simple question: Why does ObjectFactoryBase::CreateInstance
call newobject->Register()?
ALL of the remaining leaks reported by valgrind in the new FEM framework
happen because CreateInstance returns an object with a reference count of
2.
Corrolary question: ObjectFactoryBase is only used a few places:
TransformIOBase, SpatialObjectDuplicator and the FEM Framework. In the
first 2 places, LightObject::Unregister() is called to correct this
problem.
Is there any rational reason CreateInstance should call Register() on the
objects it returns?
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
________________________________
More information about the Insight-developers
mailing list