• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessor methods and (auto)release: conclusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Accessor methods and (auto)release: conclusion
      • From: Ondra Cada <email@hidden>
    • Re: Accessor methods and (auto)release: conclusion
      • From: Bill Cheeseman <email@hidden>
References: 
 >Accessor methods and (auto)release: conclusion (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Accessor methods and (auto)release: conclusion
  • Next by Date: OmniObjectMeter and multiple NSAutoreleasePools
  • Previous by thread: Re: Accessor methods and (auto)release: Relationships vs References in ULM
  • Next by thread: Re: Accessor methods and (auto)release: conclusion
  • Index(es):
    • Date
    • Thread