On 10 Jun 2018, at 19:14, Dave <d...@looktowindward.com> 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 (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