To enable memory leaks detection, where should I put _CrtDumpMemoryLeaks in the code? For example, in the program I define a class A. A member function Load is defined in class A. The function Load is used to allocate memory for some variables in the heap and then at the end of pragram, the momory is deallocated in the destructor of class A. In this scenario, where should I put _CrtDumpMemoryLeaks in the code? Thanks.