Use smart pointers in the window class