none
AMP disables memory leak reporting? (VS 2013) RRS feed

  • Question

  • My application enables the CRT memleak detection by setting the auto-report flag in its main() routine:

    _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );

    Calling any C++ AMP function (even simply listing the accelerators via accelerator::get_all()) disables the automatic reporting on program termination for some reason. This behavior seems to have been introduced in Visual Studio 2013 (Update 2); reporting behaves as expected in Visual Studio 2012.

    The behaviour can be easily reproduced e.g. by installing the "AMP Introduction and Best Practices" online sample, changing the Toolset to VS2013 ("array" needs to be replaces by "Concurrency::array" in AmpExamples.cpp since it's ambiguous) and producing a memleak in the main() routine.

    Did anyone else experience this and knows how to fix it? Calling _CrtDumpMemoryLeaks() manually works, but also reports not yet destroyed global constants etc, which makes the search for real memory leaks pretty cumbersome.


    Tuesday, July 15, 2014 2:34 PM