0

I'm using a YTPlayer view controller to play youtube videos in my app. When an instance is created, memory usage spikes up to 80 MB on the simulator. I expect it to go back to its normal value (35 MB) when the view is exited but it doesn't. All the other view controllers release memory when I exit them except this one.

I tried dismissing the view controller in viewWillDisappear method but no success.

How can I fix this?

JAL
  • 41,701
  • 23
  • 172
  • 300
Swapnil Dhanwal
  • 399
  • 2
  • 6
  • 17
  • Do you have close option on the view controller on which you are embedding this view controller? – iYoung Jun 05 '16 at 06:46
  • @iYoung not exactly. I'm using SWRevealView to make a swipe menu containing the list of all the view controllers. So by exiting a view controller, I mean swiping right and selecting another one. – Swapnil Dhanwal Jun 05 '16 at 07:55

0 Answers0