Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

free a pointer c++

myPointer = new int;
delete myPointer; //freed memory
myPointer = NULL; //pointed dangling ptr to NULL
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #free #pointer
ADD COMMENT
Topic
Name
7+9 =