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: 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