Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- 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
- char* x = &d; //this is not an allocation, this doesn't need to be deleted.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement