onDetachedFromWindow

Called when the view is detached from a window. Resets internal state and cleans up resources.