Re: Add metadata to my files for Spotlight
Re: Add metadata to my files for Spotlight
- Subject: Re: Add metadata to my files for Spotlight
- From: Lorenzo <email@hidden>
- Date: Wed, 11 May 2005 15:05:14 +0200
Jonathon, what you say is what I thought indeed. But Scott suggested to
don't do so. In that Apple sample I have found:
pool = [[NSAutoreleasePool alloc] init];
tempDict = [[NSDictionary alloc]
initWithContentsOfFile:(NSString*)pathToFile];
//....
[tempDict release];
[pool release];
return success;
I use this method in my applications and it always works well.
So, now I am confused, what do I have to do in the importer?
:-0
Best Regards
--
Lorenzo
email: email@hidden
> From: Jonathon Mah <email@hidden>
> Date: Wed, 11 May 2005 22:06:50 +0930
> To: Lorenzo <email@hidden>
> Cc: Scott Anguish <email@hidden>, Cocoa List <email@hidden>
> Subject: Re: Add metadata to my files for Spotlight
>
> On 2005-05-11, at 21:03, Lorenzo wrote:
>
>>>> tempDict = [[NSDictionary alloc]
>>>> initWithContentsOfFile:(NSString*)pathToFile];
>>>>
>>>> For a temp dict, you may perhaps prefer
>>>> dictionaryWithContentsOfFile :) Or perhaps not, depending on what
>>>> exactly you are doing :))
>>>
>>> this was done for a reason. trying to avoid using autorelease
>>> pools.
>>
>> I will use dictionaryWithContentsOfFile and not use the pool.
>
> No, you should use [[alloc] init] and _not_
> dictionaryWithContentsOfFile to avoid using the auto-release pool.
> This way you can release the dictionary as soon as you're done with
> it instead of when the Spotlight server gets around to it.
>
>
> Jonathon Mah
> email@hidden
>
>
>
_______________________________________________
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