Re: NSMenuItem addTarget & retain

2009-08-06 Thread Remko Tronçon
Hi Graham, > Yes, NSMenuItem does not retain its target. > From the docs: " That's exactly the documentation I was looking for, but couldn't find. Thanks! cheers, Remko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin r

NSMenuItem addTarget & retain

2009-08-05 Thread Remko Tronçon
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 releasi