Last active
December 11, 2015 01:28
-
-
Save gcmurphy/4523244 to your computer and use it in GitHub Desktop.
goto example for blog post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void example() | |
{ | |
A *a; | |
B *b = NULL; | |
a = a_new(); | |
if (! a){ | |
goto end; | |
} | |
b = b_new(a); | |
if (! b){ | |
goto end; | |
} | |
use_b(b); | |
end: | |
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