Skip to content

Instantly share code, notes, and snippets.

@gcmurphy
Last active December 11, 2015 01:29
Show Gist options
  • Save gcmurphy/4523463 to your computer and use it in GitHub Desktop.
Save gcmurphy/4523463 to your computer and use it in GitHub Desktop.
void example()
{
A *a;
B *b;
defer_start();
defer(puts, "bye");
a = a_new();
if (! a){
defer_end();
}
defer(a_delete, a);
b = b_new();
if (! b){
defer_end();
}
defer(b_delete, b);
use_b(b);
defer_end();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment