The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CSmartLocalPointer Class Reference
[Smart Pointer]

Collaboration diagram for CSmartLocalPointer:

List of all members.


Detailed Description

A smart pointer to memory using the LocalAlloc() API. Calls LocalFree() on any memory that the CSmartLocalPointer owns when it goes out of scope to aid in scope based designs.


Public Member Functions

 CSmartLocalPointer ()
 Create a CSmartLocalPointer that currently owns no memory.
 CSmartLocalPointer (void *pLocalMemory)
 Create a CSmartLocalPointer that owns the supplied memory which must have been allocated using LocalAlloc().
 CSmartLocalPointer (const CSmartLocalPointer &rhs)
 ~CSmartLocalPointer ()
CSmartLocalPointeroperator= (const CSmartLocalPointer &rhs)
CSmartLocalPointeroperator= (void *pLocalMemory)
void * Get () const
 Obtain access to any memory that is owned by the pointer.
void * Detach ()
 Give up ownership and return any memory that is owned.
 operator void * () const
 Provide access to any memory that is owned by the pointer.
bool IsValid () const
 Returns true if the CSmartLocalPointer currently owns some memory.


Constructor & Destructor Documentation

Create a CSmartLocalPointer that currently owns no memory.

CSmartLocalPointer ( void *  pLocalMemory  )  [explicit]

Create a CSmartLocalPointer that owns the supplied memory which must have been allocated using LocalAlloc().

CSmartLocalPointer ( const CSmartLocalPointer rhs  ) 


Member Function Documentation

CSmartLocalPointer& operator= ( const CSmartLocalPointer rhs  ) 

CSmartLocalPointer & operator= ( void *  pLocalMemory  ) 

void * Get (  )  const

Obtain access to any memory that is owned by the pointer.

HANDLE Detach (  ) 

Give up ownership and return any memory that is owned.

operator void * (  )  const

Provide access to any memory that is owned by the pointer.

bool IsValid (  )  const

Returns true if the CSmartLocalPointer currently owns some memory.


Generated on Sun Sep 12 19:11:49 2021 for The Server Framework - v7.4 by doxygen 1.5.3