Click here to Skip to main content
15,920,217 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: mfc, vs2022 compatible? Pin
charlieg17-May-24 7:56
charlieg17-May-24 7:56 
AnswerRe: mfc, vs2022 compatible? Pin
RedDk17-May-24 9:39
RedDk17-May-24 9:39 
GeneralRe: mfc, vs2022 compatible? Pin
charlieg17-May-24 10:51
charlieg17-May-24 10:51 
GeneralRe: mfc, vs2022 compatible? Pin
RedDk17-May-24 11:11
RedDk17-May-24 11:11 
AnswerRe: mfc, vs2022 compatible? Pin
Maximilien21-May-24 5:31
Maximilien21-May-24 5:31 
GeneralRe: mfc, vs2022 compatible? Pin
charlieg21-May-24 5:51
charlieg21-May-24 5:51 
GeneralRe: mfc, vs2022 compatible? Pin
Maximilien21-May-24 8:02
Maximilien21-May-24 8:02 
GeneralRe: mfc, vs2022 compatible? Pin
charlieg21-May-24 8:03
charlieg21-May-24 8:03 
QuestionC++ language updates / old C++ code Pin
HobbyProggy14-May-24 20:12
professionalHobbyProggy14-May-24 20:12 
AnswerRe: C++ language updates / old C++ code Pin
CPallini15-May-24 1:48
mveCPallini15-May-24 1:48 
GeneralRe: C++ language updates / old C++ code Pin
HobbyProggy15-May-24 20:30
professionalHobbyProggy15-May-24 20:30 
GeneralRe: C++ language updates / old C++ code Pin
CPallini20-May-24 20:07
mveCPallini20-May-24 20:07 
AnswerRe: C++ language updates / old C++ code Pin
Maximilien15-May-24 2:03
Maximilien15-May-24 2:03 
GeneralRe: C++ language updates / old C++ code Pin
HobbyProggy15-May-24 20:37
professionalHobbyProggy15-May-24 20:37 
GeneralRe: C++ language updates / old C++ code Pin
k505415-May-24 5:38
mvek505415-May-24 5:38 
GeneralRe: C++ language updates / old C++ code Pin
HobbyProggy15-May-24 20:35
professionalHobbyProggy15-May-24 20:35 
AnswerRe: C++ language updates / old C++ code Pin
jschell15-May-24 14:29
jschell15-May-24 14:29 
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 
With a memory leak, the memory footprint of the running process increases over time. If the conditions that lead to the leak are encountered often enough, the process will eventually run out of available memory, usually causing an exception of some sort. Unless you're in a very specialized environment, the memory associated with the process gets released when it exits. That means that the overall memory on the system doesn't get incrementally consumed over time. So you really only run the risk of the one process running out of memory, not the system as a whole. I hope I've explained that clearly enough.

Some system calls (and some user written functions!) use this to their advantage. On the first call they will allocate some memory, and then reuse it on successive calls. With no cleanup routine, they just rely on the program exit to do the memory release. That's why you might get notice of memory in use at exit when running a program under a memory diagnostic tool like Valgrind. When you trace back to where the memory was allocated, it might be inside something like fopen().
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown

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 

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.