Created
March 26, 2018 12:38
-
-
Save CodeSandwich/71bc41aac764d62482c6f9ae1cc3c675 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
main { | |
A = allocate() // acquire | |
do_stuff(A) // use | |
release(A) // release, pointer owns allocation | |
// delete pointer | |
} | |
do_stuff(B) { | |
do_more_stuff(B) // use | |
// don't release, pointer doesn't own allocation | |
// delete pointer | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment