Re: -[Protocol retain] warning
Re: -[Protocol retain] warning
- Subject: Re: -[Protocol retain] warning
- From: "Timothy J. Wood" <email@hidden>
- Date: Tue, 11 Nov 2003 19:25:28 -0800
Protocol subclasses from Object and thus doesn't respond to -retain.
Also, Protocol objects are created by the compiler and cannot be
created or destroyed at runtime (well, not in any polite way :)
In this case you could pass an NSValue wrapping a Protocol instead of
passing the Protocol itself.
-tim
I have some code that passes a bunch of objects to a thread through an
NSArray. One of the objects it passes is a Protocol. In Panther, when
I construct the array - which causes a retain message to be sent to
each object - I get this warning:
*** -[Protocol retain]: warning: Object compatibility method has been
executed at least once. Convert source code off it NOW!
How am I supposed to pass a protocol around?
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.