On OSX spp.Destroy() causes an segfault, sizer.Remove(app) removes app from the form but tries to call spp.Destroy() afterwards. By hiding and detaching I created a workaround for the OSX problem. This solution needs testing on Windows and Linux.