Click here to Skip to main content
15,901,666 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ language updates / old C++ code Pin
HobbyProggy15-May-24 20:41
professionalHobbyProggy15-May-24 20:41 
GeneralRe: C++ language updates / old C++ code Pin
jschell16-May-24 12:10
jschell16-May-24 12:10 
QuestionCan this be the cause of a memory leak Pin
Calin Negru9-May-24 2:50
Calin Negru9-May-24 2:50 
AnswerRe: Will this generate a memory leak Pin
Victor Nijegorodov9-May-24 3:05
Victor Nijegorodov9-May-24 3:05 
GeneralRe: Will this generate a memory leak Pin
Calin Negru9-May-24 3:37
Calin Negru9-May-24 3:37 
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 
If by "not causing problems elsewhere" you mean it's not affecting other processes, that's mostly true. You can, of course, run into an Out Of Memory (OOM) situation, where all the RAM and swap is marked as "in use", and Bad Things start happening. Assuming you've got a 64 bit OS with lots of RAM and swap configured, (heck, even a 32 bit OS with good Virtual Memory), that's only likely to happen if you've got a lot of memory allocated.

As a rule of thumb, you should clean up memory when it's no longer needed. Think of it like craftsmanship. A piece of Faberge jewelry shows attention to detail from both the back and the front. Freeing up unused memory is part of the attention to detail, just like closing files after use, for example.
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown

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 
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 
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 

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.