myPointer = new int; delete myPointer; //freed memory myPointer = NULL; //pointed dangling ptr to NULL