Answers for "why pointer need to free in c++"

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