I'm not totally convinced that the refcounting is right because I've not seen `dealloc` get triggered, but the important thing is that closing the window does cause the rust level objects to be dropped.