Home |All Classes |Grouped Classes |Index |Search

Class CL_WeakPtr

Weak pointer class (pointer to a CL_SharedPtr object that dont increase reference count). More...

Derived from:

public CL_SharedPtr_Link

Derived by:

None

Group:

System (Core)

#include <ClanLib/core.h>

Class Members:

CL_WeakPtr

disconnect

Disconnect from linked list and unset the pointer.

is_null

Tests if the pointer is unset, or the weak link is no longer valid.

get

Retrieves the pointer.

to_unknownptr

to_sharedptr

operator Type *

operator const Type *

operator CL_UnknownSharedPtr

operator CL_SharedPtr

operator->

operator==

operator!=

operator<

operator<=

operator>

operator>=

Detailed description:

Use CL_WeakPtr when you want to have a pointer that is reference counted by CL_SharedPtr but want a pointer that dont increase the reference count.

The purpose of CL_WeakPtr is to avoid circular loop issues. By using CL_WeakPtr you can construct new CL_SharedPtr'ed objects based on the weak pointer.