How Locate the error when meet the leak?
-
How Locate the error when meet the leak as follow? ///////////////// Detected memory leaks! Dumping objects -> {46} client block at 0x009C2590, subtype 0, 100 bytes long. a CWnd object at $009C2590, 100 bytes long Object dump complete. The thread 0x244 has exited with code 0 (0x0). ////////////////////// thanks in advance!!
-
How Locate the error when meet the leak as follow? ///////////////// Detected memory leaks! Dumping objects -> {46} client block at 0x009C2590, subtype 0, 100 bytes long. a CWnd object at $009C2590, 100 bytes long Object dump complete. The thread 0x244 has exited with code 0 (0x0). ////////////////////// thanks in advance!!
how do u get those wonderful information? includeh10
-
How Locate the error when meet the leak as follow? ///////////////// Detected memory leaks! Dumping objects -> {46} client block at 0x009C2590, subtype 0, 100 bytes long. a CWnd object at $009C2590, 100 bytes long Object dump complete. The thread 0x244 has exited with code 0 (0x0). ////////////////////// thanks in advance!!
1. find out where you allocated a CWnd. 2. determine where you can it. 3. delete it. -c
A conclusion is simply the place where someone got tired of thinking.
-
how do u get those wonderful information? includeh10
it's in the VC debugger's output window
A conclusion is simply the place where someone got tired of thinking.
-
1. find out where you allocated a CWnd. 2. determine where you can it. 3. delete it. -c
A conclusion is simply the place where someone got tired of thinking.
-
How Locate the error when meet the leak as follow? ///////////////// Detected memory leaks! Dumping objects -> {46} client block at 0x009C2590, subtype 0, 100 bytes long. a CWnd object at $009C2590, 100 bytes long Object dump complete. The thread 0x244 has exited with code 0 (0x0). ////////////////////// thanks in advance!!
Look at default c++ files generated by Visual C++, they usually/always have a few preprocessor lines at the beginning that enable additional debugging info, as well as leak information; if it's defined, the leak is identified, with the code line where the allocation was made. Max.
-
how do u get those wonderful information? includeh10
Detecting and Isolating Memory Leaks Using Microsoft Visual C++[^]
"The greatest danger to humanity is humanity without an open mind."
- Ian Mariano - http://www.ian-space.com/ -
How Locate the error when meet the leak as follow? ///////////////// Detected memory leaks! Dumping objects -> {46} client block at 0x009C2590, subtype 0, 100 bytes long. a CWnd object at $009C2590, 100 bytes long Object dump complete. The thread 0x244 has exited with code 0 (0x0). ////////////////////// thanks in advance!!
Since you've already got that intel, I think you may have seen Detecting and Isolating Memory Leaks Using Microsoft Visual C++[^]. Further in that article, there's a section called Comparing Memory States. If you suspect code that's leaking, wrap it with a call to checkpoint the memory before, and after, then compare. The article gives an example.
"The greatest danger to humanity is humanity without an open mind."
- Ian Mariano - http://www.ian-space.com/