Assume following scenario:
We allocate a block of memory using HeapAlloc() WINAPI function to var X
We want to reallocate X using HeapRealloc()
HeapRealloc() resizes the heap and moves to new location, therefore pointer has been changed - let's call it Y
Should we do HeapFree on the old memory address (X) after it has been moved by HeapReAlloc or will HeapReAlloc automatically clean up previous memory pointer for us?