• 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: Login item support for Panther, Tiger and Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Login item support for Panther, Tiger and Leopard


  • Subject: Re: Login item support for Panther, Tiger and Leopard
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 12 Feb 2008 13:56:41 -0500
  • Organization: Rogue Research

On 2/12/08 10:39 AM, Jerry Krinock said:

>>  However, I have noticed, using
>> Instruments.app, that these APIs have several leaks.  I suggest you
>> file
>> bugs. :(
>
>
>I just tried Instruments with Leaks on my little tool, but no leaks
>were indicated.

For me, the following repros a leak:

- (IBAction)handleLeakButton:(id)sender
{
	CFURLRef url = (CFURLRef)[NSURL fileURLWithPath:
   @"/Applications/TextEdit.app"];

	BOOL	success = NO;
	LSSharedFileListRef sfl = LSSharedFileListCreate
  (NULL, kLSSharedFileListSessionLoginItems, NULL);
	if (sfl) {
		LSSharedFileListItemRef item =
   LSSharedFileListInsertItemURL (
     sfl, kLSSharedFileListItemLast, NULL, NULL,
     url, NULL, NULL);
		if (item) {
			success = YES;
			CFRelease (item);
		}
		CFRelease (sfl);
	}
}

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Re: Fwd: Re: Login item support for Panther, Tiger and Leopard (From: "Sean McBride" <email@hidden>)
 >Re: Login item support for Panther, Tiger and Leopard (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Repetitive Appending of Strings
  • Next by Date: programmatically implementing segmented control
  • Previous by thread: Re: Login item support for Panther, Tiger and Leopard
  • Next by thread: Re: Login item support for Panther, Tiger and Leopard
  • Index(es):
    • Date
    • Thread