Click here to Skip to main content
16,017,944 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Will this generate a memory leak Pin
k50549-May-24 4:32
mvek50549-May-24 4:32 
GeneralRe: Will this generate a memory leak Pin
Calin Negru9-May-24 4:49
Calin Negru9-May-24 4:49 
GeneralRe: Will this generate a memory leak Pin
k50549-May-24 5:51
mvek50549-May-24 5:51 
AnswerRe: Can this be the cause of a memory leak Pin
Mircea Neacsu9-May-24 3:23
Mircea Neacsu9-May-24 3:23 
AnswerRe: Can this be the cause of a memory leak Pin
CPallini9-May-24 3:28
mveCPallini9-May-24 3:28 
GeneralRe: Can this be the cause of a memory leak Pin
Calin Negru9-May-24 4:53
Calin Negru9-May-24 4:53 
GeneralRe: Can this be the cause of a memory leak Pin
CPallini9-May-24 4:58
mveCPallini9-May-24 4:58 
AnswerRe: Can this be the cause of a memory leak Pin
charlieg23-May-24 1:04
charlieg23-May-24 1:04 
Ah memory leaks (and small buffer overruns).

I would point out that your example is fairly obvious. If you have a long running task, and this code is in some sort of processing loop, you'll see it quickly. What will really bite you in the a$$ are the small leaks. A byte here, a byte there. I live in the embedded world where customers forget our equipment was installed under their production line 10 years ago. The engineer responsible either died, retired or moved on to another company. I'm not being morbid, I have stories I could tell you Smile | :)

The group I work in is a decent group of smart people. Sadly, they never let us into the field to see how the product is actually used. The few times I've seen examples, they always shock me with "I didn't see that coming" sort of response. What amazes me is that if your customer never turns off your machine, why not set up an area where a test unit runs forever? I guess it falls under diminishing returns.
Charlie Gilley

“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

Has never been more appropriate.

QuestionUSB power control Pin
etechX29-May-24 18:27
etechX29-May-24 18:27 
AnswerRe: USB power control Pin
jschell9-May-24 15:31
jschell9-May-24 15:31 
AnswerRe: USB power control Pin
RedDk10-May-24 8:24
RedDk10-May-24 8:24 
AnswerRe: USB power control Pin
charlieg20-May-24 4:44
charlieg20-May-24 4:44 
Questionforeach....recursively - assistance with C++ code wnated Pin
Salvatore Terress8-May-24 6:08
Salvatore Terress8-May-24 6:08 
AnswerRe: foreach....recursively - assistance with C++ code wnated Pin
k50548-May-24 7:03
mvek50548-May-24 7:03 
GeneralRe: foreach....recursively - assistance with C++ code wnated Pin
Salvatore Terress8-May-24 8:19
Salvatore Terress8-May-24 8:19 
GeneralRe: foreach....recursively - assistance with C++ code wnated Pin
k50548-May-24 8:57
mvek50548-May-24 8:57 
GeneralRe: foreach....recursively - assistance with C++ code wnated Pin
Salvatore Terress8-May-24 17:09
Salvatore Terress8-May-24 17:09 
GeneralRe: foreach....recursively - assistance with C++ code wnated Pin
Salvatore Terress10-May-24 13:23
Salvatore Terress10-May-24 13:23 
Questionvoluntarily REMOVED Which way is correct ? Pin
Salvatore Terress6-May-24 10:19
Salvatore Terress6-May-24 10:19 
AnswerRe: Which way is correct ? Pin
Richard MacCutchan7-May-24 0:29
mveRichard MacCutchan7-May-24 0:29 
AnswerRe: voluntarily REMOVED Which way is correct ? Pin
Richard MacCutchan9-May-24 5:59
mveRichard MacCutchan9-May-24 5:59 
QuestionPassing "parent" error Pin
Salvatore Terress4-May-24 6:51
Salvatore Terress4-May-24 6:51 
AnswerRe: Passing "parent" error Pin
Richard MacCutchan5-May-24 2:45
mveRichard MacCutchan5-May-24 2:45 
Questionchange exe icon not work with multiple stage icon file. Pin
Le@rner1-May-24 2:26
Le@rner1-May-24 2:26 
AnswerRe: change exe icon not work with multiple stage icon file. Pin
Victor Nijegorodov1-May-24 4:21
Victor Nijegorodov1-May-24 4:21 

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.