realloc and free take a pointer parameter. That pointer must come from malloc/realloc. It cannot come from new.
Memory reserved with new must be released with delete.
Memory reserved with new[] must be released with delete[].
new does not only allocate memory. It constructs object to it. delete does not only deallocate memory. It calls destructor of object before deallocation.
You won't notice this, if you test only with builtin types.