Calling free()
on a block of dynamic memory informs the heap manager that the memory should be deallocated and marks that memory for deallocation. Once deallocated, the block of memory is made available for future allocationsallocation. However, the data stored in the block of memory to be recycled may be preserved. If this memory block contains sensitive information, such as passwords, that information may be unintentionally exposed. This phenomenon is referred to as Heap heap inspection ref. To prevent heap inspection it is necessary to clear sensitive information from dynamically allocated buffers before they are freed.