0

I have a few questions concerning my memory usage. I'm using instruments to keep track of what is going on, but I am a little lost with everything. I have taken a few screenshots. enter image description here

This is what my overall memory allocations looks like. In the app, I am simply pushing and popping out of a VC, but it seems with each pop I gain 3-5MB of memory. Definitely a problem, right? By around the 5 minute mark I am using about 30MB memory.

enter image description here

This is a snap of the statistics. Any giveaways for memory leaks? my imageIO_PNG_Data? Does this look like a car crash?

enter image description here

And last, a snap of the statistics over 3 generations, the growth seems pretty bad. This is about 15 minutes into using the app. Are there any glaring problems with memory here? I am also getting a memory leak occasionally (that crashes my app) when one of my sockets is fired within my app, but I wasn't able to capture that yet.

Thank you for any help.

EDIT: Okay I have some memory leaks screanshoted too, I'm starting to understand this I think.

Leak upon exiting the VC. enter image description here

enter image description here

This leak seems to be from the socket/server upon the app and socket starting.

Andy
  • 750
  • 7
  • 23
  • What are you doing inside that view controller? What objects are you creating? Are you opening sockets manually? – orkoden Feb 02 '15 at 18:52
  • I'm using a singleton for sending recieved data to the VC, the VC then takes arrays and dictionaries and sets them to local variables. Within the VC I am emitting arrays and dictionaries to the server. @orkoden – Andy Feb 02 '15 at 19:05
  • 1
    1. Make sure zombies are turned off. 2. Ignore the first few generations as there's always too much noise for those to be useful. 3. Make sure you're returning back to same point and giving it a few seconds to reach quiescence before marking the generations. 4. Your leaks are not material so I won't worry about them for now. 5. If you scroll down the allocations list, do you see any of your own classes there? Focus first on stuff your code could have possibly allocated rather than other objects that might just be along for the ride. – Rob Feb 02 '15 at 21:03
  • Just wondering? Any interesting findings? – Rob Feb 03 '15 at 12:02
  • It seems like JavaScriptCore is leaking in your second screenshot. Are you using JavaScript? If you are and you can isolate when the leak happens, you could submit it as a bug to apple. – orkoden Feb 03 '15 at 12:15
  • I'm not sure tbh, I'm using a socket called SIOSocket. I get a crash associated with that memory leak every once and a while that says EXC_BAD_ACCESS (code =1, address = 0x0)....so an object is trying to be put in a non existent pointer? @orkoden – Andy Feb 04 '15 at 01:26

0 Answers0