Re: why does this leak?
Re: why does this leak?
- Subject: Re: why does this leak?
- From: Camillo Lugaresi <email@hidden>
- Date: Tue, 14 Feb 2006 11:04:11 +0100
On 14/feb/06, at 03:08, Robert Dell wrote:
for (counter = 0; counter < [foldercontents count]; counter++)
{
[pathToSongsFolder setString: [foldercontents objectAtIndex:
counter]];
if ([pathToSongsFolder rangeOfString: @".song" options:
NSCaseInsensitiveSearch].length)
{
tempmenuitem = [[mySingMenu insertItemWithTitle: [NSString
stringWithString: pathToSongsFolder] action: @selector(singSong:)
keyEquivalent: @"" atIndex: [mySingMenu numberOfItems]] retain];
Remove this retain. The menu item is retained by the menu when it's
inserted, and will be released when it's removed from the menu.
[tempmenuitem setTarget: self];
[tempmenuitem setState: NSOffState];
[tempmenuitem setEnabled: YES];
}
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden