Answers for "cpp free pointer"

C++
0

free a pointer c++

myPointer = new int;
delete myPointer; //freed memory
myPointer = NULL; //pointed dangling ptr to NULL
Posted by: Guest on April-16-2021

Browse Popular Code Answers by Language