[Insight-developers] Rework of LightObject, Object, and Mutex

Will Schroeder will.schroeder@kitware.com
Wed, 10 Oct 2001 12:19:23 -0400


Hi Folks-

I reworked LightObject, Object, and FastMutexLock to reduce the memory footprint for LightObject subclasses. Some of the stuff I did:

+ moved m_SubjectImplementation (command/observer stuff) from LightObject to Object
+ made SimpleFastMutexLock a data member of LightObject (rather than pointer to a SimpleFastMutexLock). This required creating the separate files itkSimpleFastMutexLock.h/.cxx because of the circular includes with itkObject.
+ removed "virtual" in SimpleFastMutexLock to decrease storage (vtable)
+ Made HasObserver() a const method because I wanted to use it in the Object::PrintSelf(), which is const.

This has now been checked in. There was a fair amount of changes involved because the Command/Observer was tied into the Register()/UnRegister() methods due to DeleteEvent invocation. Please let me know if you encounter any problems.

Will