template<
typename T>
struct IRCCore::detail::ControlBlock< T >
Do not use this class directly.
Use MakeShared function.
We will use placement new/deleteĆ The ControlBlock should not be deleted even after data's destructor is called. ControlBlock is deleted when both StrongRefCount and WeakRefCount are become 0.
- Warning
- "Never" change the order of RefCount field. This feature is implemented using the c++ standard that the address of the first member in structure is same as the address of the structure itself. (see WeakPtr() implementation)
Use MakeShared function.
We will use placement new/delete The ControlBlock should not be deleted even after data's destructor is called. ControlBlock is deleted when both StrongRefCount and WeakRefCount are become 0.
- Warning
- "Never" change the order of the data[sizeof(T)] member. This feature is implemented using the c++ standard that the address of the first member in structure is same as the address of the structure itself. (see MakeShared() implementation)