> On Aug 23, 2019, at 2:17 PM, Casey McDermott via Cocoa-dev > <cocoa-dev@lists.apple.com> wrote: > > After we finished, the controller for our main window started being > deallocated some random time after launch. > Apparently the erroneous strong references were keeping it alive.
AppKit delegates, like NSWindow.delegate, are unsafe-unretained references; this might be giving you trouble. > We allocate the controller in our app delegate class. It's a member but > apparently that is not a > strong enough reference, so the controller is released at the end of the > scope. A member variable is a strong reference by default, so that should suffice to keep it alive. Is your app delegate itself being dealloced? —Jens _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com