Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. int main()
  2. {
  3.      char* d = new char[256]; //this is a 256 byte heap allocation. this needs to have delete [] called at some point or it will leak memory
  4.  
  5.  
  6.      char* x = &d; //this is not an allocation, this doesn't need to be deleted.
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement