Re: ARC
Re: ARC
- Subject: Re: ARC
- From: Jens Alfke via Cocoa-dev <email@hidden>
- Date: Sun, 25 Aug 2019 09:42:28 -0700
> On Aug 24, 2019, at 4:46 AM, Turtle Creek Software <email@hidden>
> wrote:
>
> Our app delegate class is not deallocated. The window controller is
> deallocated
> despite the member reference there.
That should not be possible. Could you paste the exact line of code that
declares the window-controller reference in the app delegate?
Have you verified that, at the point when the controller is dealloced, the
reference in the app delegate is still non-nil? (I sometimes find it useful to
set a breakpoint in the dealloc method, in weird cases like this.)
Do you have any remaining code that messes with ref-counting, I.e. by using
CFRetain/Release on Obj-C objects?
—Jens
(And let me chime in that ARC is an excellent feature. Cocoa used to have
‘true’ garbage collection as an option, but it was rarely used on Mac due to
memory and performance impact, and never implemented on iOS for that reason.
ARC works much better. Swift memory management is based on ARC, so it’s
definitely the way of the future.)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
- Follow-Ups:
- Re: ARC
- From: Turtle Creek Software via Cocoa-dev <email@hidden>
References: | |
| >Re: ARC (From: Turtle Creek Software via Cocoa-dev <email@hidden>) |