I thought I had a pretty good handle on memory management for objective-c, but I can't figure out the following situation:


@protocol MyProtocol
@end

@interface MyObject : NSObject {
    id<MyProtocol> reference;
}
@property (nonatomic, retain) id<MyProtocol> reference;
@end

@implementation MyObject 
@synthesize reference;
-(void) dealloc {
    [reference release];
    [super dealloc];
}
...
@end

This gives me a "warning: '-release' not found in protocol(s)". Can I safely ignore this error? Or am I doing something horribly wrong?

Edit
Report