I highly doubt that setting a breakpoint on objc_retain would be useful: it’s called too often. Just launching Calculator, for example, hits the function over 200000 times, so even a conditional breakpoint would make execution prohibitively slow. I would expect you to have more luck finding every location that releases mainWindowController statically and setting breakpoints there.
Saagar Jha P.S. The code for the Objective-C runtime is available here <https://opensource.apple.com/source/objc4/objc4-756.2/>. Significant portions are still in assembly, but you might find a useful comment or two. > On Aug 27, 2019, at 16:37, Uli Kusterer via Cocoa-dev > <cocoa-dev@lists.apple.com> wrote: > > On 8/26/2019 8:28 PM, Turtle Creek Software via Cocoa-dev wrote: >>>> @property (weak) GSOutlineWindowController *mainWindowController; >>>> self.mainWindowController = [[GSOutlineWindowController alloc] >> >> initWithWindowNibName : @"GSOutlineWindowController"]; >> [self.mainWindowController showWindow : self]; >> >> Sadly, nothing changes after the syntax changes. @property (strong) also >> fails. >> >>>> A better way to investigate such issue is using the memory debugging >> tools in Instrument IMHO. >>>> That would let you see all stack traces of retain/release calls. >> >> We tried that last week. The problem with ARC debugging is that >> breakpoints in dealloc() >> happen long after the release. You know it died, but not when or how. >> Sometimes we turn off ARC for one class with compiler directives, then >> breakpoint on release. > Have you tried turning on NSZombie etc.? There are a bunch of neat debug > helpers in your Build Scheme's settings. > > I think there's also a function objc_retain() or something like that, > which is a *function* in the ObjC runtime that serves as the central > bottleneck. You may have more luck breaking on that. > > Cheers, > -- Uli Kusterer > http://www.zathras.de <http://www.zathras.de/> > "The Witnesses of TeachText are everywhere..." > _______________________________________________ > > 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/saagar%40saagarjha.com > > This email sent to saa...@saagarjha.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