[patches] avoid unless exit()

Greg A. Woods woods-cyrus at weird.com
Fri Mar 26 12:01:01 EDT 2010

At Fri, 26 Mar 2010 07:15:07 +0100, Gabor Gombas <gombasg at digikabel.hu> 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 at robohack.ca>
Planix, Inc. <woods at planix.com>      Secrets of the Weird <woods at weird.com>

More information about the Info-cyrus mailing list