correct memory management in Display::changeFrame()