• 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: Ondra Cada <email@hidden>
  • Date: Tue, 6 Aug 2002 13:56:16 +0200

On Tuesday, August 6, 2002, at 10:34 , Marcel Weiher wrote:

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.

I don't know U.S. patent law well and I admit that, living outside U.S., I am somewhat indifferent to the crap (well, if something allows to patent things like this, it is nothing other).

Nevertheless it seems to me as a roaring nonsense. Autorelease pools were invented (so far as I know, might be even sooner) by NeXT and Sun when OpenStep was designed. They were part of it for a very long time, and they were definitely part of GNUStep for *much longer than Apple even knows they exist*!

As for other issues

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.

well, I understand this reasoning, but personally like more the one Ali and I have presented (incidentally, I use autorelease-based patterns very very happily for ten years in many hundreds of thousands lines; never I have an accessor-based retain problem!). Nevertheless, I guess we perhaps might agree that

(a) which you call "accessors" I call "very very plain ones";
(b) things like -title/-setTitle: I call accessors too; you have to invent another name for them (if needed);
(c) for them, those patterns I've presented (namely, using copy) are very very practical;

and, most importantly

(d) if you, in the class documentation / commented headers whether the particular setter/getter autoreleases or not and whether it copies or not,
there would be no harm anyway.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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: Marcel Weiher <email@hidden>
References: 
 >Re: Accessor methods and (auto)release: conclusion (From: Marcel Weiher <email@hidden>)

  • Prev by Date: Re: Distributed Objects over a Network
  • Next by Date: Re: Accessor methods and (auto)release: conclusion
  • Previous by thread: Re: Accessor methods and (auto)release: conclusion
  • Next by thread: Re: Accessor methods and (auto)release: conclusion
  • Index(es):
    • Date
    • Thread