This topic has not yet been rated - Rate this topic

CAutoVectorPtr Class 

This class represents a smart pointer object using vector new and delete operators.


template<
   typename T
> class CAutoVectorPtr

Parameters

T

The pointer type.

This class provides methods for creating and managing a smart pointer, which will help protect against memory leaks by automatically freeing resources when it falls out of scope. CAutoVectorPtr is similar to CAutoPtr, the only difference being that CAutoVectorPtr uses vector new[] and vector delete[] to allocate and free memory instead of the C++ new and delete operators. See CAutoVectorPtrElementTraits if collection classes of CAutoVectorPtr are required.

See CAutoPtr for an example of using a smart pointer class.

Header: atlbase.h

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.