I am currently doing some dynamic programming in C++ using QT creator. Is there a way to know if a piece of memory that I allocated dynamically is emptied out at the end of a function?
EDIT: I am trying to find if the memory is emptied after I attempted to deleted. Not check if a pointer is valid.