Detected memory leaks! :(
-
help me please, I am stucked here. :mad: It's a very simple SDI application. I got it from MFC appWizard. In the view class, I started a worker thread, which will be running until a flag is cleared. I made sure that the worker thread is ended before the program terminate, because I put a TRACE line before its return statement, and the line is outputed. But still, I got such info: Detected memory leaks! Dumping objects -> thrdcore.cpp(166) : {97} client block at 0x00305BB0, subtype 0, 112 bytes long. a CWinThread object at $00305BB0, 112 bytes long Object dump complete. To make it more annoying, this doesn't happen all the time. What can go wrong? :confused::confused::confused: Any clue is appreciated!
-
help me please, I am stucked here. :mad: It's a very simple SDI application. I got it from MFC appWizard. In the view class, I started a worker thread, which will be running until a flag is cleared. I made sure that the worker thread is ended before the program terminate, because I put a TRACE line before its return statement, and the line is outputed. But still, I got such info: Detected memory leaks! Dumping objects -> thrdcore.cpp(166) : {97} client block at 0x00305BB0, subtype 0, 112 bytes long. a CWinThread object at $00305BB0, 112 bytes long Object dump complete. To make it more annoying, this doesn't happen all the time. What can go wrong? :confused::confused::confused: Any clue is appreciated!
As its a CWinThread object thats been leaked, you can either store the pointer when you create the thread or set the m_bAutoDelete member var to true so it deletes itself when the thread ends. Roger Allen Sonork 100.10016 In case you're worried about what's going to become of the younger generation, it's going to grow up and start worrying about the younger generation. - Roger Allen, but not me!
-
As its a CWinThread object thats been leaked, you can either store the pointer when you create the thread or set the m_bAutoDelete member var to true so it deletes itself when the thread ends. Roger Allen Sonork 100.10016 In case you're worried about what's going to become of the younger generation, it's going to grow up and start worrying about the younger generation. - Roger Allen, but not me!
-
As its a CWinThread object thats been leaked, you can either store the pointer when you create the thread or set the m_bAutoDelete member var to true so it deletes itself when the thread ends. Roger Allen Sonork 100.10016 In case you're worried about what's going to become of the younger generation, it's going to grow up and start worrying about the younger generation. - Roger Allen, but not me!
-
As its a CWinThread object thats been leaked, you can either store the pointer when you create the thread or set the m_bAutoDelete member var to true so it deletes itself when the thread ends. Roger Allen Sonork 100.10016 In case you're worried about what's going to become of the younger generation, it's going to grow up and start worrying about the younger generation. - Roger Allen, but not me!
It seemed that after I add #include "StdAfx.h" to my generic cpp file, this problem is solved. But in my generic cpp file, all I did is some mathematical computation. No input or output involved, except for the argument passing to the function. What does StdAfx.h do here? Why I have to include it? It makes no sense to me. X|