Crash when window is released
zachwaugh opened this issue · 0 comments
zachwaugh commented
I'm trying to track down a crash that occurs when a window is closed (and released) that contains a TwUI view hierarchy. From what I can tell, while a NSWindow
is being dealloc'd, the TUINSView
tries to clean up the hierarchy, which ends up accessing the window and causing the crash.
I'm not familiar enough with the TUIView internals to know the proper fix, but if I set the rootView
of my TUINSView
to nil
before the window is released, it doesn't crash and every thing seems to work correctly. Here's a sample project that reproduces the crash - http://cl.ly/3R0J1k3d2f37, but you can also reproduce it in the example project by commenting out the setReleasedWhenClosed:
calls in ExampleAppDelegate.m
.