base::Shared Class Reference

Shared is a base class with an intrusive reference-count maintained by shptr/shptr0. More...

#include <_src_base_shptr_doc.hh>

Inheritance diagram for base::Shared:

threads::NonThreadable base::Array< T > base::Event< EVENT >::ListenerFunctor base::TimeClock::ElapsedTimeFunctor base::Timer::Callback base::Timer::Functor control::Joystick::TimerFunctor

Detailed Description

Shared is a base class with an intrusive reference-count maintained by shptr/shptr0.

See shptr_doc.hh.

Shared isn't thread-safe. For threading, use ThreadableShared with thptr or thptr0.

Shared provides storage for the reference-count that shptr maintains. Combining the reference-count with the object reduces memory allocations (as opposed to allocating a separate reference-count). Shared is just a data class. shptr computes the reference-count.

/// Example:
/// class Object : public Shared { ... };
/// shptr<Object> object = new Object;
/// 

The documentation for this class was generated from the following file:
Palomino Flight Simulator documents generated by doxygen 1.5.6 on Tue Sep 28 11:37:49 2010