FROM : Wesley Smith
DATE : Fri Jul 25 22:07:29 2008
> Removing a menu with -removeItem: or -removeItemAtIndex: doesn't return
> anything, and in any case you didn't alloc, copy, or retain anything, so you
> don't have to worry about releasing anything.
While this is true, I'm using - (NSMenuItem *)itemWithTitle:(NSString
*)aString to get the item if it exists and using that pointer from
then on out instead of replacing it. So, let's say I want to modify
the File menu, if I have a pointer to it when the app closes, should I
be worried about freeing it if it was generated from a nib file and
not procedurally by me in the code?
thanks,
wes
DATE : Fri Jul 25 22:07:29 2008
> Removing a menu with -removeItem: or -removeItemAtIndex: doesn't return
> anything, and in any case you didn't alloc, copy, or retain anything, so you
> don't have to worry about releasing anything.
While this is true, I'm using - (NSMenuItem *)itemWithTitle:(NSString
*)aString to get the item if it exists and using that pointer from
then on out instead of replacing it. So, let's say I want to modify
the File menu, if I have a pointer to it when the app closes, should I
be worried about freeing it if it was generated from a nib file and
not procedurally by me in the code?
thanks,
wes
| Related mails | Author | Date |
|---|---|---|
| Wesley Smith | Jul 25, 18:28 | |
| Caleb Strockbine | Jul 25, 21:05 | |
| Wesley Smith | Jul 25, 22:07 | |
| I. Savant | Jul 26, 06:09 |






Cocoa mail archive

