bug-gnustep
[Top][All Lists]
Advanced

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

RFA: NSAutoreleasePool ivar cleanup


From: David Ayers
Subject: RFA: NSAutoreleasePool ivar cleanup
Date: Thu, 24 Mar 2011 07:00:38 +0100

Hi folks,

I was chasing a sporadic (very seldom) crash which we noticed on
production instances.  The version of the libraries we are using is
ancient.  But the issue may still exist.

in NSAutoreleasePool -emptyPool there is this comment:
      /* If there are NSAutoreleasePool below us in the stack of
         NSAutoreleasePools, then deallocate them also.  The (only) way
we
         could get in this situation (in correctly written programs,
that
         don't release NSAutoreleasePools in weird ways), is if an
         exception threw us up the stack. */
      while (_child != nil)
        {
          [_child dealloc];
        }

well... we may have an incorrectly written program here and we may not
catch alle exceptions properly but I currently cannot tell for sure.
But whether correct or not, I believe the _child ivar should be cleared
after the dealloc since release pools get recycled.

This is an RFA (Request for Approval) to apply this patch.

Cheers,
David



-- 
David Ayers - Team Austria
Free Software Foundation Europe (FSFE) []          (http://www.fsfe.org)
Join the Fellowship of FSFE!         [][][]      (https://fsfe.org/join)
Your donation powers our work!         ||       (http://fsfe.org/donate)

Attachment: base.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]