Is _objc_flush_caches_(Class) necessary to swizzle methods?
Is _objc_flush_caches_(Class) necessary to swizzle methods?
- Subject: Is _objc_flush_caches_(Class) necessary to swizzle methods?
- From: DumberThanDanQuayle <email@hidden>
- Date: Fri, 24 Sep 2004 04:47:29 -0400
<x-tad-bigger>Method swizzling code examples, specifically that in Anguish et al. in "Cocoa Programming" at page 1083 and those archived at CocoaBuilder, mention the need to call "_objc_flush_caches_(Class)" after swizzling to keep the runtime kosher.
I have tried this and found that I get some runtime strangeness while running the debugger, like specific confusion about inheritence and the states of ivars.
A page on method swizzling at CocoaDev does not mention the use of this _objc_flush_caches_(Class), so I ran my software without it and my ivar state problem appeared to go away:
http://www.cocoadev.com/index.pl?MethodSwizzling
But I have yet to rigorously test the issue.
Does anybody know what the story with "_objc_flush_caches_(Class)" and method swizzling really is?
Thanks and don't forget to vote,
George.
</x-tad-bigger>
<x-tad-bigger>"[A]s you know, these are open forums, you're able to come and listen to what I have to say."
George W. Bush
—Washington, D.C., Oct. 28, 2003
</x-tad-bigger> _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden