Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: e32base.h
Link against: euser.lib

Class CArrayPtr

CArrayPtr<class T>

Support

Supported from 5.0

Description

A thin templated base class for arrays of pointers to objects. The public functions contribute to standard array behaviour.

The class is always derived from and is never instantiated explicitly.

Derivation

CArrayFixA thin templated base class for arrays of fixed length objects
CArrayFixBaseBase class for arrays of fixed length objects
CArrayPtrA thin templated base class for arrays of pointers to objects
CBaseBase class for all classes to be instantiated on the heap

Defined in CArrayPtr:
ResetAndDestroy()

Inherited from CArrayFix:
AppendL(), AppendL()Append, Array(), At(), Back(), End(), ExpandL(), ExtendL(), Find(), FindIsq(), InsertIsqAllowDuplicatesL(), InsertIsqL(), InsertL(), ResizeL(), operator[]

Inherited from CArrayFixBase:
Compress(), Count(), Delete(), Length(), Reset(), Sort()

Inherited from CBase:
operator new()


Destroy and reset


ResetAndDestroy()

void ResetAndDestroy();

Description

Destroys all objects whose pointers form the elements of the array, before resetting the array.

The destructor of each <class T> object is called before the objects themselves are destroyed.

If the array is not empty, this member function must be called before the array is deleted to prevent the CBase derived objects from being orphaned on the heap.

Notes

Each call to this function results in a small, but non-trivial, amount of code being generated.