Is cocos2dx-3.0 beta2 memory leak?

my enviroment is vs2012(4) + cocos2dx-3.0 beta2
i create “Test” project with create-preject.py, nothing to change but using Visual Leak Detector to build, i found memory leak information on output window.
is cocos2dx-3.0 beta2 memory leak?

some output information:
---------- Block 18902 at 0x04CDBC20: 64 bytes ---------- Call Stack: c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector (1583): Test.exe!std::vector<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<std::pair<int const ,cocos2d::Value> > > >,std::_Wrap_alloc<std::allocator<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<std::pair<int const ,cocos2d:: + 0x17 bytes c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector (1252): Test.exe!std::vector<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<std::pair<int const ,cocos2d::Value> > > >,std::_Wrap_alloc<std::allocator<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<std::pair<int const ,cocos2d:: + 0x28 bytes c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector (1455): Test.exe!std::vector<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<std::pair<int const ,cocos2d::Value> > > >,std::_Wrap_alloc<std::allocator<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<std::pair<int const ,cocos2d:: + 0x53 bytes c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector (1242): Test.exe!std::vector<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<std::pair<int const ,cocos2d::Value> > > >,std::_Wrap_alloc<std::allocator<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<std::pair<int const ,cocos2d:: c:\program files (x86)\microsoft visual studio 11.0\vc\include\xhash (1012): Test.exe!std::_Hash<std::_Umap_traits<int,cocos2d::Value,std::_Uhash_compare<int,std::hash<int>,std::equal_to<int> >,std::allocator<std::pair<int const ,cocos2d::Value> >,0> >::_Init c:\program files (x86)\microsoft visual studio 11.0\vc\include\xhash (319): Test.exe!std::_Hash<std::_Umap_traits<int,cocos2d::Value,std::_Uhash_compare<int,std::hash<int>,std::equal_to<int> >,std::allocator<std::pair<int const ,cocos2d::Value> >,0> >::_Hash<std::_Umap_traits<int,cocos2d::Value,std::_Uhash_compare<int,std::hash<int>,std:: c:\program files (x86)\microsoft visual studio 11.0\vc\include\unordered_map (114): Test.exe!std::unordered_map<int,cocos2d::Value,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int const ,cocos2d::Value> > >::unordered_map<int,cocos2d::Value,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int const ,cocos2d::Value> > > e:\myproject\cocos2d-x\cocos2d-x-3.0beta2\projects\test\cocos2d\cocos\base\ccvalue.cpp (37): Test.exe!cocos2d::Value::Value + 0xE7 bytes c:\program files (x86)\microsoft visual studio 11.0\vc\include\unordered_map (239): Test.exe!std::unordered_map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,cocos2d::Value,std::hash<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::equal_to<std::basic_string<char,std::char_traits<char>,std::alloca + 0xA bytes e:\myproject\cocos2d-x\cocos2d-x-3.0beta2\projects\test\cocos2d\cocos\2d\ccconfiguration.cpp (79): Test.exe!cocos2d::Configuration::init + 0x56 bytes e:\myproject\cocos2d-x\cocos2d-x-3.0beta2\projects\test\cocos2d\cocos\2d\ccconfiguration.cpp (161): Test.exe!cocos2d::Configuration::getInstance e:\myproject\cocos2d-x\cocos2d-x-3.0beta2\projects\test\cocos2d\cocos\2d\renderer\ccrenderer.cpp (124): Test.exe!cocos2d::Renderer::~Renderer + 0x5 bytes 0x0128D806 (File and line number not available): Test.exe!cocos2d::Renderer::scalar deleting destructor’ + 0x16 bytes
e:\myproject\cocos2d-x\cocos2d-x-3.0beta2\projects\test\cocos2d\cocos\2d\ccdirector.cpp (190): Test.exe!cocos2d::Director::~Director + 0x22 bytes
0x0128CDD6 (File and line number not available): Test.exe!cocos2d::DisplayLinkDirector::~DisplayLinkDirector + 0x16 bytes
0x0128D786 (File and line number not available): Test.exe!cocos2d::DisplayLinkDirector::`scalar deleting destructor’ + 0x16 bytes
e:\myproject\cocos2d-x\cocos2d-x-3.0beta2\projects\test\cocos2d\cocos\base\ccobject.cpp (109): Test.exe!cocos2d::Object::release + 0x22 bytes
e:\myproject\cocos2d-x\cocos2d-x-3.0beta2\projects\test\cocos2d\cocos\2d\ccdirector.cpp (782): Test.exe!cocos2d::Director::purgeDirector
e:\myproject\cocos2d-x\cocos2d-x-3.0beta2\projects\test\cocos2d\cocos\2d\ccdirector.cpp (1041): Test.exe!cocos2d::DisplayLinkDirector::mainLoop + 0x8 bytes
e:\myproject\cocos2d-x\cocos2d-x-3.0beta2\projects\test\cocos2d\cocos\2d\platform\win32\ccapplication.cpp (98): Test.exe!cocos2d::Application::run + 0x17 bytes
e:\myproject\cocos2d-x\cocos2d-x-3.0beta2\projects\test\proj.win32\main.cpp (18): Test.exe!wWinMain + 0xC bytes
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (528): Test.exe!__tmainCRTStartup + 0x15 bytes
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (377): Test.exe!wWinMainCRTStartup
0x754F336A (File and line number not available): kernel32.dll!BaseThreadInitThunk + 0x12 bytes
0x77059F72 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x63 bytes
0x77059F45 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x36 bytes
Data:
98 98 50 00 98 98 50 00 98 98 50 00 98 98 50 00 …P…P. …P…P.
98 98 50 00 98 98 50 00 98 98 50 00 98 98 50 00 …P…P. …P…P.
98 98 50 00 98 98 50 00 98 98 50 00 98 98 50 00 …P…P. …P…P.
98 98 50 00 98 98 50 00 98 98 50 00 98 98 50 00 …P…P. …P…P.

Visual Leak Detector detected 274 memory leaks (19808 bytes).
Largest number used: 2336881 bytes.
Total allocations: 3884733 bytes.
Visual Leak Detector is now exiting.`

Some objects have the same lifecycle as the application. But they will be treated as memory leak with VLD.

@zhangxm
thx!:slight_smile:
by the way, what memory tools is recommended in this case?

I usually use Xcode instruments.

@zhangxm
Thx for your help!

It’s my pleasure.