Use objects of the IMngPointer class as managed pointers for collections. Managed pointers keep a reference count for each referenced element. When the last managed pointer to the element is destructed, the element is automatically deleted.
Construct or destruct a managed pointer object.
![]() |
public:
~IMngPointer()
Destructs the pointer and decrements the reference count of the referenced element. If the reference count is 0, the referenced element is deleted.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IMngPointer(Element*, IExplicitInit)
Constructs a pointer of the indicated type from a given C++ pointer. The reference count of the referenced element is set to 1.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IMngPointer()
Constructs a pointer of the indicated type and initializes it with NULL.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IMngPointer(IMngPointer < Element > const&)
Constructs a new pointer and initializes it with the given pointer. The reference count of the referenced element is incremented by 1.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IMngPointer < Element >& operator =( IMngPointer < Element > const& )
Assigns the given pointer to this pointer. The reference count of the referenced element is incremented and the reference count of the previously referenced element is decremented.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these operators to access the element being managed by this object.
![]() |
public:
Element& operator *() const
Returns a reference to the object to which the pointer refers.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
Element* operator ->() const
Returns a C pointer to the object to which the pointer refers.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
operator Element *() const
Implicitly converts this pointer to a C++ pointer.
Windows | OS/2 | AIX |
Yes | Yes | Yes |