While presenting ViewController application receives memory warning

Whenever tap song from table view it leads memory to 117 to 170 some time app crashes in device

In table view didSelectRowAtIndexPath i wrote following code

if([fileStatus isEqualToString:@"IN_LOCAL"])
{
  musicObject=[songManagerObject getSongForName:filename];
 [musicPlayerObject play:musicObject];
    [self presentViewController:[musicPlayerObject playerObj] animated:YES completion:^{}];
}

Method Play

@property(strong,nonatomic) AudioCoreViewController *playerObj;


-(void) play:(MusicBase *)mx;
{
    if([mx.fileType isEqualToString:@"mp3"])
    {
        playerObj=[AudioCoreViewController sharedAudioPlayer];
        [playerObj play:mx];  
    }
}

Answers


if ([fileStatus isEqualToString:@"IN_LOCAL"]) { 
  musicObject=[songManagerObject getSongForName:filename];
  NSLog(@"%@",musicObject.fileName); 

  [self presentViewController:[musicPlayerObject playerObj] animated:YES completion:^{
    [musicPlayerObject play:musicObject]; 
   }]; 
} 

Need Your Help

Cannot scroll horizontally with ScrollView for IOS

ios objective-c cocoa-touch uiscrollview

I am trying to display my advertisement images on horizontally ScrollView, just like the scroll view on the top of App store. The size of the images is 320*180.

How to call process by name or tags in python

python multiprocessing

I am using multiprocessing module. This module is works on Queue that is its pick random process and assign the entery from Queue.