Visual Studio 2010 Part18
■ このスレッドは過去ログ倉庫に格納されています
0048デフォルトの名無しさん
2012/01/08(日) 00:09:28.86// stdafx.h
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#ifdef _DEBUG
#ifndef DBG_NEW
#define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
#define new DBG_NEW
#endif
#endif // _DEBUG
// test.cpp
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
int* a = new int;
return 0;
}
// 出力ウィンドウ
Detected memory leaks!
Dumping objects ->
test1.cpp(8) : {101} normal block at 0x0000000000488320, 4 bytes long.
Data: < > CD CD CD CD
Object dump complete.
ちゃんと位置わかるけど
■ このスレッドは過去ログ倉庫に格納されています