On Oct 13, 2010, at 2:44 PM, Dave DeLong wrote: > I maintain some code that does dynamic subclassing to override an object's > -dealloc method to do some extra cleanup prior to deallocation. (And for the > curious, this cleanup is not necessary when using Garbage Collection)
As mentioned, it's not safe to do isa-swizzling because KVO also does it. Have you considered doing method swizzling on -[NSObject dealloc]? (And maybe -[NSProxy dealloc], too, I guess.) Also, have you considered whether you really need to be doing these sorts of hacks at all? ;) For example, could you get away with objc_setAssociatedObject()? Regards, Ken _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com