libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
SharedPtrProxy< T > Class Template Reference

A proxy class for managing reference counting of objects that do not natively support it. More...

#include <sharedptr.h>

Collaboration diagram for SharedPtrProxy< T >:

Public Member Functions

 SharedPtrProxy (T *o)
 
T_promeki_clone () const
 
Tobject () const
 

Public Attributes

RefCount _promeki_refct
 

Detailed Description

template<typename T>
class SharedPtrProxy< T >

A proxy class for managing reference counting of objects that do not natively support it.

This class acts as a proxy to manage the lifetime of objects that do not have built-in reference counting. It uses an internal RefCount object to track the number of references and ensures that the managed object is deleted when the reference count drops to zero. Generally you don't need to use this object directly, since it will be created by SharedPtr when SharedPtr has been typed with an object that isn't a natively reference counted object (i.e. has no _promeki_refct member)

Limitations:

  • This class assumes that the managed object can be safely deleted.
  • Copy of objects that use polymorphism can't be done.
  • It does not support custom deleters.
Template Parameters
TThe type of the object being managed.

The documentation for this class was generated from the following file: