when freeing window data for a window, also remove the pointer to it in the window