• 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: Future Objective-C changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Future Objective-C changes


  • Subject: Re: Future Objective-C changes
  • From: Quentin Mathé <email@hidden>
  • Date: Wed, 21 May 2003 20:56:44 +0200

Le mercredi, 21 mai 2003, ` 13:56 Europe/Paris, Clark S. Cox III a icrit :

Note that you have to have three calls to [gc restoreGraphicsContext]; (actually one plus one per exception handler and one per return statement). This leads to very hard to maintain code. If you use a stack-based utility class, you only have to declare it once, and you've basically enclosed that function in a protective bubble, you've just guaranteed that after you leave the current stack frame for any reason, you've properly reset the global state.
This type of stack-based utility class is quite logical and straight forward. You want to mack some change, but only have it persist for the current stack frame, what better way than to tie the actually setting/resetting of that state to entering and leaving the stack frame?

... is it possible to have an example of a stack-based utility class, I don't understand what you mean here.

--
Quentin Mathi
email@hidden
_______________________________________________
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.

References: 
 >Re: Future Objective-C changes (From: "Clark S. Cox III" <email@hidden>)

  • Prev by Date: getting rid of text-field contextual menu
  • Next by Date: Re: Future Objective-C changes
  • Previous by thread: Re: Future Objective-C changes
  • Next by thread: Re: Future Objective-C changes
  • Index(es):
    • Date
    • Thread