| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Memory matters |
On: 14 Oct 03 00:00:12 Pascal Schmidt wrote to Bo Simonsen: > BS> In my file ticker, I'm reading the configuration into a structure.. > BS> This structure do I need all the time, so I figured is it nessersary > BS> to free it then I'm ending the program? > Nope, when the program is terminated, all its memory is freed automatically > (no idea about Windows or DOS, though, but they should be the same). I think that is a lazy attitude. I suppose you don't use fclose either. I know that some programmers get in the habit of not freeing memory because they wish to avoid an access violation that may result when free is called if their code does not manipulate memory properly. You should always explicitly free any memory that you have explicitly allocated if for no reason other than to show that you have not made a big mess that you are hoping will be cleaned up when the program ends. -Roger --- Spinone v0.1.79 Win32* Origin: Scudder's Point (1:261/38.11) SEEN-BY: 633/267 270 @PATH: 261/38 123/500 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.