• 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: Add metadata to my files for Spotlight
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Add metadata to my files for Spotlight
      • From: Scott Anguish <email@hidden>
    • Re: Add metadata to my files for Spotlight
      • From: Ondra Cada <email@hidden>
References: 
 >Re: Add metadata to my files for Spotlight (From: Jonathon Mah <email@hidden>)

  • Prev by Date: Re: Add metadata to my files for Spotlight
  • Next by Date: [ANN] F-Script 1.3 with Core Data Explorer 1.0 Released
  • Previous by thread: Re: Add metadata to my files for Spotlight
  • Next by thread: Re: Add metadata to my files for Spotlight
  • Index(es):
    • Date
    • Thread