diff -r 000000000000 -r ce9c83f7ec14 With.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/With.h Sun Jul 13 10:45:42 2008 -0700 @@ -0,0 +1,21 @@ +// +// With.h +// MYUtilities +// +// Copyright 2008 Jens Alfke. All rights reserved. +// + +#import + + +#define WITH(OBJ) id __with=[OBJ beginWith]; @try + +#define ENDWITH @finally{[__with endWith];} +#define CATCHWITH @catch(NSException *x){id w=__with; __with=nil; _catchWith(w,x);} @finally{[__with endWith];} + +void _catchWith( id with, NSException *x ); + +@interface NSAutoreleasePool (With) ++ (NSAutoreleasePool*) beginWith; +- (void) endWith; +@end \ No newline at end of file