🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Freeing memory in #pragma exit

#7871
From: kim sang woo
Date: Wed, 06 Sep 1995 06:24
20 lines
1581 bytes
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... :(

   Stay away from pragma exit...   You are better off using atexit()
functions.  it's supported by ANSI.
   You are missing the poiont of dynamic allocation if you were to
allocate memory and never release it until program ends.  You are better
of using hard coded array.

:         ---Will
: +----------------------------------------------------------------------+
: |     William White ®¯ Yakima, WA. ®¯ Hi-Country Foods Corporation     |
: |    Quality Assurance Lab Technician ®¯ Computer Analyst/Programmer   | 
: |             ** We make it, you drink it, you love it **              |
: |Check out our new web page at http://www.wolfe.net/~hcfoods/index.html|
: |       For my Public PGP key, please finger me at wcw@wolfe.net       |
: +----------------------------------------------------------------------+
Technical Details
Message-ID: <42jern$1t8@mp.cs.niu.edu>
Path: arc1-ca.pugleaf.net!mp.cs.niu.edu!not-for-mail
References: <42hdl3$rkr@ratty.wolfe.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!mp.cs.niu.edu!not-for-mail
From: z929171@cs.niu.edu (kim sang woo)
Newsgroups: comp.os.msdos.programmer,comp.lang.c
Subject: Re: Freeing memory in #pragma exit
Followup-To: comp.os.msdos.programmer,comp.lang.c
Date: 6 Sep 1995 01:24:55 -0500
Organization: Northern Illinois University
Message-ID: <42jern$1t8@mp.cs.niu.edu>
References: <42hdl3$rkr@ratty.wolfe.net>
NNTP-Posting-Host: mp.cs.niu.edu
X-Newsreader: TIN [version 1.2 PL2]