Ah, I think I see what you're saying. I could create a custom
CFDictionaryHashCallBack to simply return the pointer value or something,
thereby skirting the -hash problem.
Intriguing. I'll play with this and report back. The thing I have against
this approach is that it potentially allows fo
Yeah, thanks for this. I've been over Mike's code, and he gets around this
issue by using class_setSuperclass(), which the documentation says should not
be used.
How would using a CFDictionary with custom callbacks make things any better?
In order to find things in the dictionary, things are
On Wed, Oct 13, 2010 at 2:02 PM, Dave DeLong wrote:
> As for the rationale behind why I need to do this, I'll just refer to my blog
> post on the matter:
> http://davedelong.com/blog/2010/10/07/fun-objective-c-dynamic-subclassing
Funny enough, it sounds like the blog post I linked you to (and
Good questions.
I know that this swizzling will only be happening on NSViews (since that's what
my code operates on). As I mentioned in the original email, my current
implementation exchanges -dealloc with a new one, which then invokes the
original dealloc method. This appears to work well, b
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
On Wed, Oct 13, 2010 at 12:44 PM, Dave DeLong wrote:
> What's involved with safely subclassing an object that's already been
> dynamically subclassed with KVO?
You can't. See the comments here:
http://www.mikeash.com/pyblog/friday-qa-2010-07-16-zeroing-weak-references-in-objective-c.html
--Kyle
Hi everyone,
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)
However, I observed a problem this morning, and that's when