🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7875

Re: Freeing memory in #pragma exit

#7875
From: Guest
Date: Thu, 07 Sep 1995 17:58
11 lines
951 bytes
In article <42hdl3$rkr@ratty.wolfe.net>, William White <wcw@wolfe.net> wrote:
>	Is it better to free all allocated memory from new & malloc()...  by freeing 
>it with a #pragma exit function, or a regular function just before exit() is 
>called?  Using the #pragma exit way, I've been getting some lockup in my 
>program... :(

Don't call library functions in any #pragma exit registered functions.

As to freeing the memory, if you're program ends already there is really
no need to start freeing memory shortly before that.  Simply exiting the
program will free the memory afterward.
Technical Details
Message-ID: <42nbs5$bop@server2.dh.ixe.net>
Path: arc1-ca.pugleaf.net!server2.dh.ixe.net!guest
References: <42hdl3$rkr@ratty.wolfe.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!server2.dh.ixe.net!guest
From: guest@cuci.nl (Guest)
Newsgroups: comp.os.msdos.programmer,comp.lang.c
Subject: Re: Freeing memory in #pragma exit
Date: 7 Sep 1995 17:58:29 GMT
Organization: Internet Exchange Europe B.V.
Message-ID: <42nbs5$bop@server2.dh.ixe.net>
References: <42hdl3$rkr@ratty.wolfe.net>
NNTP-Posting-Host: cuci.ixe.net