Click here to Skip to main content
15,913,487 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: mem allocation in console app Pin
Jonathan [Darka]27-Jul-06 23:02
professionalJonathan [Darka]27-Jul-06 23:02 
AnswerRe: mem allocation in console app Pin
toxcct27-Jul-06 23:02
toxcct27-Jul-06 23:02 
GeneralRe: mem allocation in console app Pin
9ine27-Jul-06 23:25
9ine27-Jul-06 23:25 
GeneralRe: mem allocation in console app Pin
toxcct27-Jul-06 23:29
toxcct27-Jul-06 23:29 
GeneralRe: mem allocation in console app Pin
9ine28-Jul-06 0:57
9ine28-Jul-06 0:57 
GeneralRe: mem allocation in console app Pin
Zac Howland28-Jul-06 9:30
Zac Howland28-Jul-06 9:30 
GeneralRe: mem allocation in console app Pin
9ine1-Aug-06 6:24
9ine1-Aug-06 6:24 
GeneralRe: mem allocation in console app Pin
Gary R. Wheeler29-Jul-06 3:31
Gary R. Wheeler29-Jul-06 3:31 
9ine wrote:
It is very well designed and quite large


It is not well designed if it fails to clean up after itself. True, the operating system will clean up most resources allocated by your program after it exits, even when you don't free them yourself. The problem is, it may not free all of them. There are resources in Windows that are not freed automatically when a program exits. This means that your program could leave behind resource allocations that can never be freed without a restart. Dangling allocations could also cause your application to fail the next time you run it. A resource you allocated previously and did not free is no longer available.

The other problem is that, while your program is running, it continually consumes more and more resources. If you don't free them as soon as you are done using them, they are a waste. Those resources aren't available for use by other applications or the operating system.


Software Zen: delete this;

QuestionVS6 Linker looking for Include files? Pin
Storm-blade27-Jul-06 22:49
professionalStorm-blade27-Jul-06 22:49 
AnswerRe: VS6 Linker looking for Include files? Pin
toxcct27-Jul-06 22:55
toxcct27-Jul-06 22:55 
GeneralRe: VS6 Linker looking for Include files? Pin
Storm-blade27-Jul-06 23:59
professionalStorm-blade27-Jul-06 23:59 
AnswerRe: VS6 Linker looking for Include files? Pin
Cedric Moonen27-Jul-06 22:58
Cedric Moonen27-Jul-06 22:58 
GeneralRe: VS6 Linker looking for Include files? Pin
Storm-blade27-Jul-06 23:58
professionalStorm-blade27-Jul-06 23:58 
GeneralRe: VS6 Linker looking for Include files? Pin
Cedric Moonen28-Jul-06 0:06
Cedric Moonen28-Jul-06 0:06 
AnswerRe: VS6 Linker looking for Include files? Pin
Hamid_RT27-Jul-06 23:07
Hamid_RT27-Jul-06 23:07 
AnswerRe: VS6 Linker looking for Include files? Pin
KarstenK27-Jul-06 23:13
mveKarstenK27-Jul-06 23:13 
GeneralRe: VS6 Linker looking for Include files? Pin
Storm-blade28-Jul-06 0:02
professionalStorm-blade28-Jul-06 0:02 
AnswerRe: files displayed on the CFileDialog Pin
Naveen27-Jul-06 22:52
Naveen27-Jul-06 22:52 
JokeRe: files displayed on the CFileDialog Pin
Hamid_RT27-Jul-06 23:09
Hamid_RT27-Jul-06 23:09 
GeneralRe: files displayed on the CFileDialog Pin
toxcct27-Jul-06 23:19
toxcct27-Jul-06 23:19 
GeneralRe: files displayed on the CFileDialog Pin
Hamid_RT27-Jul-06 23:32
Hamid_RT27-Jul-06 23:32 
GeneralRe: files displayed on the CFileDialog Pin
Naveen27-Jul-06 23:37
Naveen27-Jul-06 23:37 
GeneralRe: files displayed on the CFileDialog Pin
toxcct27-Jul-06 23:56
toxcct27-Jul-06 23:56 
GeneralRe: files displayed on the CFileDialog Pin
see me27-Jul-06 23:51
see me27-Jul-06 23:51 
GeneralRe: files displayed on the CFileDialog Pin
toxcct27-Jul-06 23:55
toxcct27-Jul-06 23:55 

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.