• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: why does this leak?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >why does this leak? (From: Robert Dell <email@hidden>)
 >Re: why does this leak? (From: Charlton Wilbur <email@hidden>)
 >Re: why does this leak? (From: Robert Dell <email@hidden>)

  • Prev by Date: Re: "No document could be created." panel
  • Next by Date: Re: Using zlib for i386 (or Universal) builds on PPC clients
  • Previous by thread: Re: why does this leak?
  • Next by thread: Re: why does this leak?
  • Index(es):
    • Date
    • Thread