Click here to Skip to main content
15,917,061 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Kill a thread Pin
toxcct1-Apr-05 3:19
toxcct1-Apr-05 3:19 
GeneralRe: Kill a thread Pin
bouli1-Apr-05 3:25
bouli1-Apr-05 3:25 
GeneralRe: Kill a thread Pin
ThatsAlok1-Apr-05 18:35
ThatsAlok1-Apr-05 18:35 
GeneralRe: Kill a thread Pin
eli150219791-Apr-05 3:10
eli150219791-Apr-05 3:10 
GeneralRe: Kill a thread Pin
bouli1-Apr-05 3:17
bouli1-Apr-05 3:17 
GeneralRe: Kill a thread Pin
BadJerry1-Apr-05 3:47
BadJerry1-Apr-05 3:47 
GeneralRe: Kill a thread Pin
bouli1-Apr-05 3:50
bouli1-Apr-05 3:50 
GeneralRe: Kill a thread Pin
Blake Miller1-Apr-05 4:55
Blake Miller1-Apr-05 4:55 
Memory leaks because you called TerminateThread(), who would have thought.... Just kidding.
But of COURSE you have memory leaks, since your thread did not terminate 'normally'.

You really ARE dealing with a poorly designed driver, aren't you? They should have provided at least a 'is data available' call for you or something. Is there truly no way to set any kind of timeout in case there is no data? Most device drivers will just return that there are no bytes to read instead of hanging your thread up.

Part of your leak might be from the CWinThread object returned from the AfxBeginThread call. When you assssinate your thread, you might want to at least delete the CWinThread object data.

I truly encourage you to seek another driver, or at least a design option that does not force you to continually start and kill threads in this manner.

Good luck!

GeneralRe: Kill a thread Pin
bouli1-Apr-05 5:05
bouli1-Apr-05 5:05 
GeneralRe: Kill a thread Pin
bouli1-Apr-05 5:05
bouli1-Apr-05 5:05 
GeneralRe: Kill a thread Pin
David Crow1-Apr-05 3:56
David Crow1-Apr-05 3:56 
GeneralDialog resource Pin
The Professor1-Apr-05 2:08
The Professor1-Apr-05 2:08 
GeneralRe: Dialog resource Pin
toxcct1-Apr-05 2:15
toxcct1-Apr-05 2:15 
GeneralRe: Dialog resource Pin
The Professor1-Apr-05 12:13
The Professor1-Apr-05 12:13 
GeneralRe: Dialog resource Pin
ThatsAlok1-Apr-05 2:17
ThatsAlok1-Apr-05 2:17 
GeneralRe: Dialog resource Pin
David Crow1-Apr-05 3:58
David Crow1-Apr-05 3:58 
GeneralRe: Dialog resource Pin
The Professor1-Apr-05 12:20
The Professor1-Apr-05 12:20 
GeneralRe: Dialog resource Pin
ThatsAlok1-Apr-05 18:05
ThatsAlok1-Apr-05 18:05 
GeneralRe: Dialog resource Pin
The Professor2-Apr-05 18:43
The Professor2-Apr-05 18:43 
GeneralAbout Windows Explorer-style TreeView Pin
Kim Myong1-Apr-05 1:54
Kim Myong1-Apr-05 1:54 
GeneralRe: About Windows Explorer-style TreeView Pin
Alexander M.,1-Apr-05 2:54
Alexander M.,1-Apr-05 2:54 
GeneralRe: About Windows Explorer-style TreeView Pin
Kim Myong1-Apr-05 3:41
Kim Myong1-Apr-05 3:41 
GeneralRe: About Windows Explorer-style TreeView Pin
Alexander M.,1-Apr-05 3:47
Alexander M.,1-Apr-05 3:47 
GeneralMFC Toolbox Pin
charu1231-Apr-05 1:32
charu1231-Apr-05 1:32 
GeneralRe: MFC Toolbox Pin
Maximilien1-Apr-05 2:50
Maximilien1-Apr-05 2:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.