CMemoryState::CMemoryState

CMemoryState( );

Remarks

Constructs an empty CMemoryState object that must be filled in by the Checkpoint or Difference member function.

Example

See CObList::CObList for a listing of the CAge class used in all collection examples.

// example for CMemoryState::CMemoryState
// Includes all CMemoryState functions
CMemoryState msOld, msNew, msDif;
msOld.Checkpoint();
CAge* page1 = new CAge( 21 );
CAge* page2 = new CAge( 22 );
msOld.DumpAllObjectsSince();
msNew.Checkpoint();
msDif.Difference( msOld, msNew );
msDif.DumpStatistics();

The results from this program are as follows:

Dumping objects ->
{2} a CObject at $190A
{1} a CObject at $18EA
Object dump complete.
0 bytes in 0 Free Blocks
8 bytes in 2 Object Blocks
0 bytes in 0 Non-Object Blocks
Largest number used: 8 bytes
Total allocations: 8 bytes

CMemoryState OverviewClass MembersHierarchy Chart