Re: Future Objective-C changes
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.