Re: Inserting a custom class into class hierarchy?
Re: Inserting a custom class into class hierarchy?
- Subject: Re: Inserting a custom class into class hierarchy?
- From: Shaun Wexler <email@hidden>
- Date: Sat, 4 Dec 2004 05:12:34 -0800
On Dec 4, 2004, at 4:53 AM, The Karl Adam wrote:
hmm, according to the docs you are correct, the subclass cannot add
any instance variables, so you'd have to use the poseAsClass in
addition to the CustomIvarStruct or an NSHashMap, but however you
handle your added instance data, it iwould have to be external to the
MyObject class.
Well guys, I just made a test project and confirmed that this "hack"
definitely works as I imagined! I'm now in the process of writing a
custom CFAllocator. Posing as NSObject or NSResponder crashed, but all
other non-toll-free-bridged objects seem to function normally... and
are noticeably faster, because I incorporated an inline refcount. ;;))
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
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