Re: Crashes inside CFStringDeallocate
Re: Crashes inside CFStringDeallocate
- Subject: Re: Crashes inside CFStringDeallocate
- From: Alastair Houghton <email@hidden>
- Date: Mon, 11 Jun 2018 07:31:54 +0100
On 10 Jun 2018, at 19:14, Dave <email@hidden> wrote:
>
> Override the dealloc method and log when its called - its probably being
> over-released!
That isn’t quite as simple as it sounds, because this is NSString we’re talking
about, which is a class cluster. Most actual NSString instances are really
NSCFString, though there’s nothing stopping other things from cropping up. To
make this work, you’d have to change the class of the string object for your
own subclass (quite possibly using object_setClass(), because there’s a good
chance the string object either didn’t come from your code).
It’s probably better to use the built-in debugging features (zombies and the
various memory debugging tools in Instruments, not to mention the debugging
features in malloc).
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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