Re: Accessor methods and (auto)release: conclusion
Re: Accessor methods and (auto)release: conclusion
- Subject: Re: Accessor methods and (auto)release: conclusion
- From: Marcel Weiher <email@hidden>
- Date: Tue, 6 Aug 2002 10:34:05 +0200
Another issue to be aware of is that autorelease-pools are patented by
Apple. Therefore, their use presents a definite obstacle to
code-portability to, for example, GNUStep.
Once again, I see their use in default accessors as completely
gratuitous, and actually somewhat harmful. I also have to admit that
in the light of the Apple patent, their gratuitous introduction does
have implications that I don't like at all.
Marcel
On Monday, August 5, 2002, at 11:15 Uhr, Ondra Cada wrote:
-getter {
return ivar;
}
-(void)setter:newObject {
[ivar autorelease];
ivar=[newObject copy]; // or retain, depending on object & usage
}
-getter {
return [[object retain] autorelease];
}
-(void)setter:newObject {
if (ivar==newObject) return;
[ivar release];
ivar=[newObject copy]; // or retain, depending on object & usage
}
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.