Re: problem with NSAffineTransform...
Re: problem with NSAffineTransform...
- Subject: Re: problem with NSAffineTransform...
- From: Ondra Cada <email@hidden>
- Date: Fri, 21 Sep 2001 11:13:50 +0200
Rob,
>
>>>>> Rob Rix (RR) wrote at Fri, 21 Sep 2001 04:41:14 -0400:
RR> >That's quite right -- any class method which creates objects returns
RR> >them _autoreleased_ (therefore the object is actually released at the
RR> >end of event
RR> >loop, and the place in memory can be occupied by any other object).
RR>
RR> ....except for the (deprecated?) +new... methods, which aren't used so
RR> often anyhow.
Right. I felt it would only confuse a newbie, and thus I haven't mentioned it.
Actually, +alloc also creates object and returns it non-autoreleased, which
I took for understood from the context, but perhaps it was not. So, a
_complete_ thing looks this way:
(i) only the methods +alloc, -copy, -mutableCopy should return new
non-autoreleased objects in Cocoa;
(ii) if there is *any* legacy from the pre-OpenStep days (like +new), it
would return non-autoreleased object as well (since there was no autorelease
pool then);
(iii) no other method should make new object non-autoreleased.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc