• 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: Scott Anguish <email@hidden>
  • Date: Thu, 12 May 2005 01:48:31 -0400


On May 11, 2005, at 9:05 AM, Lorenzo wrote:

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?



    The auto-release pool around the entire block is for safety sake.

The answer is probably not as clear cut as any of us would like it to be.

the goal in writing an importer will likely include re-using your existing loading code for many developers. This makes autorelease pools unavoidable to many applications.

If you can do it without, that's probably best, but I don't think it's likely to be considered a crime worthy of any significant punishment if you use it.



--
"William Cheeseman ... is said not to be a doofus in real life." - Roger Ebert, Chicago Sun-Times Online


Scott Anguish
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
References: 
 >Re: Add metadata to my files for Spotlight (From: Lorenzo <email@hidden>)

  • Prev by Date: Code developed on XCode 1.5/Panther does not run on Tiger
  • Next by Date: Re: forwarding KVO from NSDocument to model
  • Previous by thread: Re: Add metadata to my files for Spotlight
  • Next by thread: Possible NSTokenField bug
  • Index(es):
    • Date
    • Thread