|
MULTIBODY SIMULATION SOFTWARE - API documentation |
#include <CHshared.h>

Public Member Functions | |
| void | AddRef () |
| void | RemoveRef () |
| int | ReferenceCount () |
Intrusive smart pointers must call AddRef() each time they reference such kind of object, and call RemoveRef() each time that they do not reference it anymore. When the reference count falls to 0, the object is automatically deleted.
| void chrono::ChShared::AddRef | ( | ) |
Add a reference to this object (tell that someone, in addition to the creator, is using it. For example some pointer is pointing to it... In fact intrusive smart pointers automatically call this when copied.
| void chrono::ChShared::RemoveRef | ( | ) |
Remove a reference to this object (tell that someone who was using it, now is not interested in it anymore). If the reference count drops to zero, the last time RemoveRef() is called, the object is automatically deleted. Also the creator must call this, instead of delete(). In fact intrusive smart pointers automatically call this.
| int chrono::ChShared::ReferenceCount | ( | ) |
Tells how many items are sharing this object, i.e. the reference count.
CHRONO::ENGINE