One of the simplest ways to detect a leak in your code would be to use debugCRT.
a. Create you project in visual studio
b. run the project in debug mode, then only you will find the memory leak dumps
_CrtSetDbgFlag(_CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_ALLOC_MEM_DF);
//below call will break where the leak is in the code provided you give the error number as shown in the //dump.
// your code here
//Below windows API will dump the leaks