Update of bug #18804 (project gnustep):

              Item Group:                     Bug => Change Request         
                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

This is plainly not a bug (since it's legitimate/normal to return ivars whose
life is that of the receiver, and the GNUstep and MacOS-X documentation don't
say that the value will be autoreleased), so I have treated it as a change
request instead.
I've implemented it for consistency.

This behavior is actually an undocumented implementation detail, and can't be
guaranteed in GNUstep-base or Cocoa Foundation.
This means that if an application depends on this implementation detail then
there is a bug in the application ... the general rule for handling objects
returned by methods is that the caller MUST retain the object immediately
before calling any other method which might possibly cause it to be
destroyed.  Assuming that the object will persist as long as the enclosing
autorelease pool persists is an error unless the method is specifically
documented as returning an autoreleased object.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?18804>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to