When you say "separate, strong reference to each tab view controller” do you 
mean each child view controller that controls a single tab view item, or the 
tab view controller as a whole? It is keeping string references to the 
individual child view controllers that should solve your situation.

You may also want to check out Instrument’s zombies, which might better 
pinpoint where the issue is ocurring.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

> On May 22, 2019, at 8:26 AM, Casey McDermott <supp...@turtlesoft.com> wrote:
> 
> Our Mac app adds tabs to a NSTabView programmatically.  After switching tabs 
> a few times, one of the NSTabViewItems would release
> prematurely, causing a crash.  So we switched it to using a 
> NSTabViewController.  Tab switching still crashes, but now it releases a
> NSViewController prematurely.  
> 
> Nothing else in the code references tab items or tab controllers.  This is 
> baffling. We can set a breakpoint on dealloc to see when it is deleted, 
> but can't breakpoint on release to see what releases it.  We build with 
> latest Xcode but this has been going on with older ones also.
> 
> We tried adding a separate, strong reference to each tab view controller.  It 
> still crashes, but it takes a few more tab switches before the controller is 
> released.
> 
> Any suggestions for what might be causing this?
> 
> Casey McDermott
> Turtle Creek Software
> _______________________________________________
> 
> 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/cocoa-dev%40esoteritech.com
> 
> This email sent to cocoa-...@esoteritech.com

_______________________________________________

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

Reply via email to