Re: Login item support for Panther, Tiger and Leopard
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