Re: [patches] avoid unless exit()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Fri, 26 Mar 2010 07:15:07 +0100, Gabor Gombas <gombasg@xxxxxxxxxxxx> wrote:
Subject: Re: [patches] avoid unless exit()
> 
> On Thu, Mar 25, 2010 at 10:30:42AM -0400, Greg A. Woods wrote:
> > 
> > indeed, and memory "frees" itself at exit time too, and calling free() a
> > whole lot of times on a sure path to exit() is a pedantic waste of time
> > and code (and thus maintenance).
> 
> OTOH properly releasing memory on exit paths makes hunting for memory
> leaks _much_ easier.

on "return" paths, perhaps, but not exit() paths -- there is no leak on
exit() :-)

memory management without (automatic) garbage collection is difficult to
be sure!

so, when I say "a sure path to exit()", I mean to imply that there's no
"return" involved and that we don't depend on the caller continuing on
to an exit().

-- 
						Greg A. Woods

+1 416 218-0098                VE3TCP          RoboHack <woods@xxxxxxxxxxx>
Planix, Inc. <woods@xxxxxxxxxx>      Secrets of the Weird <woods@xxxxxxxxx>
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux