Commit Graph

9 Commits

Author SHA1 Message Date
Robert Osfield
b807fc83fe Added mutex lock to destructor. 2010-02-19 16:04:33 +00:00
Robert Osfield
8f11af8d3e Replaced local mutex with getObserverMutex(). 2010-02-19 15:41:42 +00:00
Robert Osfield
26a9e499a4 Fixed crash 2010-02-16 14:05:49 +00:00
Robert Osfield
a8e26f3a0c Threads safety fixes based on suggestions from Tim Moore. 2010-02-16 11:10:49 +00:00
Robert Osfield
644b2e15d1 Refactored the osg::Observer to introduce a new bool Observer::objectUnreferenced(void*) method that adds
the extra capability of making it possible for Observers to assume ownership of a object that would otherwsie be deleted.

Added a thread safe ref_ptr<T> observer_ptr<T>::lock() method for robust access to an observed object.  This
makes observer_ptr<> more equivilant to boosts weak_ptr.
2010-02-15 20:12:53 +00:00
Robert Osfield
1be388c705 Changed the const get(), operator*() and operator->() methods to return non const T versions 2008-03-14 11:06:35 +00:00
Robert Osfield
4ab9c6f5f4 Removed check from objectDeleted(void*) method as this was not catching cases
where the registered ptr was different from the deleted ptr - something that
can happen with multiple inheritance.
2006-11-26 22:27:09 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
8f2ffb7c2d Added new observer_ptr templated smart pointer to allow one to retain pointers
to objects but have the pointer reset to null if that object is deleted.
2006-02-27 19:44:33 +00:00