Simplify window destruction with virtual destructors.