Skip to content

Instantly share code, notes, and snippets.

@domiyanyue
Last active August 10, 2020 01:34
Show Gist options
  • Save domiyanyue/5a5143682562befa430c3e837fd4a54a to your computer and use it in GitHub Desktop.
Save domiyanyue/5a5143682562befa430c3e837fd4a54a to your computer and use it in GitHub Desktop.
RAII Example 1
int demo1(){
A *a = new A();
int r = a -> func();
delete a;
return r;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment