diff --git a/JGE/src/iOS/wagicAppDelegate.m b/JGE/src/iOS/wagicAppDelegate.m index e84f606c3..6b6a6b90b 100755 --- a/JGE/src/iOS/wagicAppDelegate.m +++ b/JGE/src/iOS/wagicAppDelegate.m @@ -41,7 +41,6 @@ [wagicDownloadController performSelectorInBackground: @selector(startDownload:) withObject:@"core"]; [self.window addSubview: wagicDownloadController.view]; - [wagicDownloadController.view release]; [self.window makeKeyWindow]; } diff --git a/projects/mtg/iOS/SoundManager/SoundManager.m b/projects/mtg/iOS/SoundManager/SoundManager.m index 0920a0e28..d46678de5 100644 --- a/projects/mtg/iOS/SoundManager/SoundManager.m +++ b/projects/mtg/iOS/SoundManager/SoundManager.m @@ -362,13 +362,14 @@ SYNTHESIZE_SINGLETON_FOR_CLASS(SoundManager); NSMutableArray *playlistTracks = [musicPlaylists objectForKey:aPlaylistName]; if (!playlistTracks) { - playlistTracks = [[NSMutableArray alloc] init]; + playlistTracks = [NSMutableArray arrayWithCapacity: 1]; } [playlistTracks addObject:aTrackName]; // Add the track key to the play list [musicPlaylists setObject:playlistTracks forKey:aPlaylistName]; + } - (void)startPlaylistNamed:(NSString*)aPlaylistName { @@ -391,14 +392,15 @@ SYNTHESIZE_SINGLETON_FOR_CLASS(SoundManager); NSMutableArray *playlistTracks = [musicPlaylists objectForKey:aPlaylistName]; if (playlistTracks) { - int indexToRemove; - for (int index=0; index < [currentPlaylistTracks count]; index++) { + int indexToRemove = -1; + for (NSUInteger index=0; index < [currentPlaylistTracks count]; index++) { if ([[currentPlaylistTracks objectAtIndex:index] isEqualToString:aTrackName]) { indexToRemove = index; break; } } - [currentPlaylistTracks removeObjectAtIndex:indexToRemove]; + if (indexToRemove >= 0) + [currentPlaylistTracks removeObjectAtIndex:indexToRemove]; } } diff --git a/projects/mtg/iOS/asi-http-request/ASIHTTPRequest.m b/projects/mtg/iOS/asi-http-request/ASIHTTPRequest.m index 8b239edc4..77eac076c 100644 --- a/projects/mtg/iOS/asi-http-request/ASIHTTPRequest.m +++ b/projects/mtg/iOS/asi-http-request/ASIHTTPRequest.m @@ -1156,7 +1156,7 @@ static NSOperationQueue *sharedQueue = nil; // Create the stream for the request // - NSFileManager *fileManager = [[[NSFileManager alloc] init] autorelease]; + NSFileManager *fileManager = [NSFileManager defaultManager]; [self setReadStreamIsScheduled:NO]; @@ -1214,6 +1214,7 @@ static NSOperationQueue *sharedQueue = nil; CFReadStreamSetProperty((CFReadStreamRef)[self readStream], kCFStreamPropertySSLSettings, (CFTypeRef)sslProperties); + [sslProperties release]; } // Tell CFNetwork to use a client certificate