Hi, Is the following piece of code legal?
Foo* foo = [[Foo aloc] init]; NSMenuItem* item = [[NSMenuItem alloc] initWithTitle: @"Item" action: @selector(action:) keyEquivalent: @""]; [item setTarget: foo]; [foo release]; Unless I have a problem in some other part of my code, it seems that releasing the 'foo' object is not allowed. In my limited knowledge of Cocoa, I would expect that NSMenuItem retains foo. Is this a wrong assumption? thanks, Remko _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com