Cleanup of this pointer and parent tracking.