Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: is atexit required?

Reply
Thread Tools

Re: is atexit required?

 
 
Eric Sosman
Guest
Posts: n/a
 
      10-08-2013
On 10/8/2013 2:20 PM, mhnbtngr wrote:
> hi group,
>
> I am trying to understand atexit.
> If I am not wrong,upon exit from our programm,OS automagically flushes
> the buffers,cleansup not free'd memory.closes the files we had opened.
> In that case why do we require atexit handlers?
> Any helop or pointers appreciated.


(Minor point: A "sensible" environment will recycle or dispose
of the memory the program used, but this is not actually required
by the C language.)

Many programs need only the automatic cleanup the environment
provides. But some programs may need additional cleanup, and the
atexit() mechanism is one way to ensure it happens. You are not
"required" to use it, but it's there in case you need it.

--
Eric Sosman
http://www.velocityreviews.com/forums/(E-Mail Removed)d
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
atexit + threads = bug? David Rushby Python 7 01-13-2006 02:35 PM
atexit not being executed Chris Gorton Python 0 05-03-2005 02:02 PM
Dying words... exit atexit abort JKop C++ 8 10-01-2004 11:05 PM
Radical: listing decorators compared to atexit function registration Bengt Richter Python 0 08-25-2004 08:26 PM
atexit and global destructors Serve Laurijssen C++ 3 01-15-2004 05:52 PM



Advertisments