我在CView的OnDraw()函数中用下列方法:
#ifdef _DEBUG
CMemoryState dMem;
dMem.Checkpoint();
TRACE("mem:\n\n");
dMem.DumpStatistics();
#endif //_DEBUG
且删除 pDC->TextOut(0, 0, "Hello, world!"); 这行, 它本身消耗内存
将窗口最大最小化几次,Total allocations从 11291 bytes 变成Total allocations: 12491 bytes. 请教哪位有什么办法?
0 bytes in 0 Free Blocks.
923 bytes in 20 Normal Blocks.
5857 bytes in 44 CRT Blocks.
0 bytes in 0 Ignore Blocks.
1636 bytes in 12 Client Blocks.
Largest number used: 8684 bytes.
Total allocations: 11291 bytes.
.......
........
0 bytes in 0 Free Blocks.
923 bytes in 20 Normal Blocks.
5857 bytes in 44 CRT Blocks.
0 bytes in 0 Ignore Blocks.
1636 bytes in 12 Client Blocks.
Largest number used: 8684 bytes.
Total allocations: 12491 bytes.
#ifdef _DEBUG
CMemoryState dMem;
dMem.Checkpoint();
TRACE("mem:\n\n");
dMem.DumpStatistics();
#endif //_DEBUG
且删除 pDC->TextOut(0, 0, "Hello, world!"); 这行, 它本身消耗内存
将窗口最大最小化几次,Total allocations从 11291 bytes 变成Total allocations: 12491 bytes. 请教哪位有什么办法?
0 bytes in 0 Free Blocks.
923 bytes in 20 Normal Blocks.
5857 bytes in 44 CRT Blocks.
0 bytes in 0 Ignore Blocks.
1636 bytes in 12 Client Blocks.
Largest number used: 8684 bytes.
Total allocations: 11291 bytes.
.......
........
0 bytes in 0 Free Blocks.
923 bytes in 20 Normal Blocks.
5857 bytes in 44 CRT Blocks.
0 bytes in 0 Ignore Blocks.
1636 bytes in 12 Client Blocks.
Largest number used: 8684 bytes.
Total allocations: 12491 bytes.