Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Freeing memory from console apps on exit

Status
Not open for further replies.

SuperHebbe

Programmer
Dec 25, 2005
6
0
0
NO
Hi

This is my first post here :D
I my to programming on Windows cause I'm used to Amiga (RIP)
The question is: I have made a program that generates statistics files from hl2dm and the program is in a forever loop.. When I quit the console app, does it free the memory or do I have to call some special stuff to point at my cleanup routine when or something when I quit the program...

Thanks :)

SuperHebbe

 
The memory should be free'd when the program ends.
 
But the program never ends... Just when you quit it by pressing the X mark or ALT-F4..
 
Then you'd better make sure you don't have any memory leaks, otherwise your memory usage will keep rising until you run out of memory.
 
SuperHebbe said:
But the program never ends... Just when you quit it by pressing the X mark or ALT-F4..

When you quit the program, the program ends.
 
On modern Windows (from NT generation) you may safety kill (with task manager, for example) your console application, no memory (or what else) resourse leak. Of course, you may have incompleted output (buffered) file(s) contents in that case.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top