Use a more precise method to track the memory freed.