Skip to content

Instantly share code, notes, and snippets.

@gcmurphy
Created January 13, 2013 10:21
Show Gist options
  • Save gcmurphy/4523433 to your computer and use it in GitHub Desktop.
Save gcmurphy/4523433 to your computer and use it in GitHub Desktop.
void example()
{
A *a;
B *b;
a = a_new();
if (!a){
puts("bye");
return;
}
b = b_new(a);
if (!b){
a_delete(a);
puts("bye");
return;
}
use_b(b);
b_delete(b);
a_delete(a);
puts("bye");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment