Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
#define P6_REFCOUNTED (   classname)
Value:
struct P6R::P6AUTO_INT32 P6AUTO_INT32
Auto initializing INT32.
#define P6_REFCOUNTED_THREADSAFE_RELEASE(classname)
P6_REFCOUNTED_THREADSAFE_RELEASE(classname)
Definition: p6comhlpr.h:573
#define P6_REFCOUNTED_CREATEINSTANCE(classname)
| _ \ ___ / _|/ ___|___ _ _ _ __ | |_ ___ __| | | | | | ___| |_ __ ___ _ __ ___ | |_) / _ \ |_| | / ...
Definition: p6comhlpr.h:517
#define P6_REFCOUNTED_THREADSAFE_ADDREF(classname)
P6_REFCOUNTED_THREADSAFE_ADDREF(classname)
Definition: p6comhlpr.h:554

#define P6_REFCOUNTED(classname)

The P6_REFCOUNTED method is used to declare and implement the methods which the p6IRefCounted interface needs:

addref() and release() implement the standard P6COM reference counting semantics. createInstance() is also provided so that non-P6COM based classes can be created in the same fashion as P6COM based classes. Following this pattern has some advantages, for example it allows memory pooling (or the use of an alternate allocator of some other type) to be very easily added to the class if needed because the actual allocation is now abstracted.

Classes which derrive from p6IRefCounted MUST follow the standard P6COM reference counting semantics. It is highly recommended that classes which derrive from p6IRefCounted also be managed using the p6RefCounted<> smart pointer.

Parameters
classnameThe name of the class in which the reference counting methods will be decared/implemented in.

Definition at line 610 of file p6comhlpr.h.