Click here to Skip to main content
15,887,776 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to prevent HDD format with source. Pin
Michael Dunn28-Jun-09 15:18
sitebuilderMichael Dunn28-Jun-09 15:18 
GeneralRe: how to prevent HDD format with source. Pin
ShinHyun28-Jun-09 16:41
ShinHyun28-Jun-09 16:41 
GeneralRe: how to prevent HDD format with source. Pin
killabyte28-Jun-09 17:47
killabyte28-Jun-09 17:47 
GeneralRe: how to prevent HDD format with source. Pin
Michael Dunn28-Jun-09 18:17
sitebuilderMichael Dunn28-Jun-09 18:17 
GeneralRe: how to prevent HDD format with source. Pin
ShinHyun28-Jun-09 21:37
ShinHyun28-Jun-09 21:37 
GeneralRe: how to prevent HDD format with source. Pin
«_Superman_»28-Jun-09 22:21
professional«_Superman_»28-Jun-09 22:21 
QuestionADO API Problem. Pin
forexsurfr28-Jun-09 12:59
forexsurfr28-Jun-09 12:59 
QuestionMemory leak due to waiting thread Pin
Still learning how to code28-Jun-09 9:21
Still learning how to code28-Jun-09 9:21 
I have an application in which a second (worker) thread is created using AfxBeginThread().   The execution of this thread can be stalled due to a WaitOnSingleObject(), which MAY never get signalled.   In this situation, when the application main thread terminates, I get a memory leak as follows:-

Detected memory leaks!
Dumping objects ->
strcore.cpp(118) : {78} normal block at 0x003011E0, 16 bytes long.
Data: <                  D:\ > 01 00 00 00 03 00 00 00 03 00 00 00 44 3A 5C 00
strcore.cpp(118) : {77} normal block at 0x00301220, 59 bytes long.
Data: <            .   Thre> 01 00 00 00 11 00 00 00 2E 00 00 00 54 68 72 65
thrdcore.cpp(166) : {71} client block at 0x003014C0, subtype 0, 112 bytes long.
a CWinThread object at 003014C0, 112 bytes long

If the WaitOnSingleObject gets signalled, then there is no memory leak.

I have tried various things to get over this problem, but have had no success.   How should I properly deal with a waiting thread to avoid the memory leak ?   (Apologies if this is a "trivial" question to the more experienced "threaders" !!)

Doug

AnswerRe: Memory leak due to waiting thread Pin
Joe Woodbury28-Jun-09 9:34
professionalJoe Woodbury28-Jun-09 9:34 
GeneralRe: Memory leak due to waiting thread Pin
Still learning how to code28-Jun-09 10:32
Still learning how to code28-Jun-09 10:32 
GeneralRe: Memory leak due to waiting thread Pin
Joe Woodbury28-Jun-09 11:18
professionalJoe Woodbury28-Jun-09 11:18 
GeneralRe: Memory leak due to waiting thread Pin
Still learning how to code28-Jun-09 18:56
Still learning how to code28-Jun-09 18:56 
GeneralRe: Memory leak due to waiting thread Pin
Roger Stoltz28-Jun-09 21:58
Roger Stoltz28-Jun-09 21:58 
QuestionVertical scrollbar smooth scrolling in list control? Pin
Artz28-Jun-09 8:39
Artz28-Jun-09 8:39 
QuestionQt question Pin
alikalik28-Jun-09 8:30
alikalik28-Jun-09 8:30 
AnswerRe: Qt question Pin
Rajesh R Subramanian28-Jun-09 9:24
professionalRajesh R Subramanian28-Jun-09 9:24 
QuestionDLLRegisterServer failed with error code 0x80040200 Pin
zon_cpp27-Jun-09 22:37
zon_cpp27-Jun-09 22:37 
AnswerRe: DLLRegisterServer failed with error code 0x80040200 Pin
«_Superman_»27-Jun-09 23:36
professional«_Superman_»27-Jun-09 23:36 
GeneralRe: DLLRegisterServer failed with error code 0x80040200 Pin
zon_cpp28-Jun-09 19:17
zon_cpp28-Jun-09 19:17 
GeneralRe: DLLRegisterServer failed with error code 0x80040200 Pin
«_Superman_»28-Jun-09 22:15
professional«_Superman_»28-Jun-09 22:15 
GeneralRe: DLLRegisterServer failed with error code 0x80040200 Pin
zon_cpp28-Jun-09 22:36
zon_cpp28-Jun-09 22:36 
Questionhow to print create time of mail Pin
santhosh-padamatinti27-Jun-09 19:38
santhosh-padamatinti27-Jun-09 19:38 
Questionsetting font......... Pin
kumar sanghvi27-Jun-09 18:16
kumar sanghvi27-Jun-09 18:16 
Questiongood SQL to find a min valid user ID Pin
includeh1027-Jun-09 10:10
includeh1027-Jun-09 10:10 
QuestionResizing PropertySheet. Pin
FISH78627-Jun-09 9:59
FISH78627-Jun-09 9:59 

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.