int* p = new int;
*p = 10;
delete p;信息如下:(VC7.1 F5调试状态下)
Detected memory leaks!
Dumping objects ->
{55} normal block at 0x00372650, 33 bytes long.
Data: < 2| > D8 9C 32 7C 10 00 00 00 10 00 00 00 01 00 00 00
{53} normal block at 0x00372610, 4 bytes long.
Data: <`&7 > 60 26 37 00
Object dump complete.
*p = 10;
delete p;信息如下:(VC7.1 F5调试状态下)
Detected memory leaks!
Dumping objects ->
{55} normal block at 0x00372650, 33 bytes long.
Data: < 2| > D8 9C 32 7C 10 00 00 00 10 00 00 00 01 00 00 00
{53} normal block at 0x00372610, 4 bytes long.
Data: <`&7 > 60 26 37 00
Object dump complete.
void CMFCLeakerTestDlg::OnBnClickedButton1()
{
int* p = new int;
*p = 10;
delete p;
}