Comment
Comment by snyball
The GC may move allocated objects around, changing their pointers in the process. This is used in some garbage collectors (.NET and Haskell for example) to combat memory fragmentation, by compacting the memory to remove small gaps.