Commit af26945f authored by James Dumay's avatar James Dumay Committed by Felix Paul Kühne

use @autoreleasepool instead of NSAutoreleasePool

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent c91e6972
...@@ -866,21 +866,20 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString ...@@ -866,21 +866,20 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString
#if !TARGET_OS_IPHONE #if !TARGET_OS_IPHONE
- (void)fetchMetaInformationForArtWorkWithURL:(NSString *)anURL - (void)fetchMetaInformationForArtWorkWithURL:(NSString *)anURL
{ {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; @autoreleasepool {
NSImage * art = nil; NSImage * art = nil;
if (anURL) { if (anURL) {
// Go ahead and load up the art work // Go ahead and load up the art work
NSURL * artUrl = [NSURL URLWithString:[anURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSURL * artUrl = [NSURL URLWithString:[anURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
// Don't attempt to fetch artwork from remote. Core will do that alone // Don't attempt to fetch artwork from remote. Core will do that alone
if ([artUrl isFileURL]) if ([artUrl isFileURL])
art = [[[NSImage alloc] initWithContentsOfURL:artUrl] autorelease]; art = [[NSImage alloc] initWithContentsOfURL:artUrl];
} }
// If anything was found, lets save it to the meta data dictionary
[self performSelectorOnMainThread:@selector(setArtwork:) withObject:art waitUntilDone:NO];
[pool release]; // If anything was found, lets save it to the meta data dictionary
[self performSelectorOnMainThread:@selector(setArtwork:) withObject:art waitUntilDone:NO];
}
} }
- (void)setArtwork:(NSImage *)art - (void)setArtwork:(NSImage *)art
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment