0

I'm using AFNetworking for downloading video file from server. Since my app target on iOS7+, i use method downloadTaskWithRequest:progress:destination:completionHandler:

When i download a large file(400M), the memory detector of xcode seems weird, the memory keeps growing and several Received Memory Warning print in the console, then my app is killed.

memory detector of xcode

But when i profile with Instruments, the allocations of memory seem to be stable.

enter image description here

The app does not crash if i run my app directly without debug, crash only appears when running with xcode. Is this a bug of xcode? or my app has memory issues(may be memory leaks)??

Update: Xcode version 7.1.1, iOS8.3, Using Objective-C

nova
  • 781
  • 11
  • 17
  • Turn off NSZombie detection. – Avi Nov 26 '15 at 10:19
  • @Avi Enable Zombie Objects option in the `Diagnostics` isn't selected. – nova Nov 27 '15 at 06:12
  • someone has the same problem, got one answer, but still confused(if the memory monitor of xcode is not correct, why should it be used in xcode). Run in release mode, still have the problem. http://stackoverflow.com/questions/28321954/ios-memory-usage-increasing-cant-find-the-culprit?rq=1 – nova Nov 27 '15 at 06:31
  • Huh. That fixed it for me. In any event, if you care about memory usage, use Instruments. (edit) Have you tried an Analyze run, to see if it finds any memory leaks? – Avi Nov 27 '15 at 08:09
  • I'd advise turning off `Enable backtrace recording` as well, except for when you need it. That eats a lot of memory – Jonathan Crooke Apr 06 '16 at 15:15

0 Answers0