60 return ::LocalReAlloc(
ptr,
size, 0);
86 return ::GlobalReAlloc(
ptr,
size, 0);
96template<
class T,
class Allocator = CCRTAllocator>
130 m_pData =
static_cast<T*
>(Allocator::Allocate(nBytes));
136 T* newData =
static_cast<T*
>(Allocator::Reallocate(
m_pData, nBytes));
static void Free(_In_opt_ void *ptr)
static void * Reallocate(_In_opt_ void *ptr, _In_ size_t size)
static void * Allocate(_In_ size_t size)
static void * Allocate(_In_ size_t size)
static void * Reallocate(_In_opt_ void *ptr, _In_ size_t size)
static void Free(_In_opt_ void *ptr)
CHeapPtr< T, Allocator > & operator=(CHeapPtr< T, Allocator > &lp)
bool Reallocate(_In_ size_t nElements)
bool ReallocateBytes(_In_ size_t nBytes)
bool AllocateBytes(_In_ size_t nBytes)
CHeapPtr(CHeapPtr< T, Allocator > &lp)
bool Allocate(_In_ size_t nElements=1)
static void Free(_In_opt_ void *ptr)
static void * Reallocate(_In_opt_ void *ptr, _In_ size_t size)
static void * Allocate(_In_ size_t size)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_In_opt_ PALLOCATE_FUNCTION Allocate
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free