Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
I don't think I'll actually do this, but it was fun to come up with.
// syntactic sugar for @onExit
#define releaseOnExit \
ext_saveSelf]; @onExit { [ext_releaseObj release]; }; [(id)nil self
NSMutableString *str = [[@"foo" mutableCopy] releaseOnExit];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment