iOS Swift - Debugging Memory Leaks -
i'm working on app , has horrible memory leaks. observed far more use app, more memory consumes. thought way navigation handled. have slide menu framework written in objective c. in swift file (header handled) added following code:
if let app = uiapplication.shared.delegate as? appdelegate, let window = app.window { if let viewcontrollers = window.rootviewcontroller?.childviewcontrollers { viewcontroller in viewcontrollers { print("😀" + viewcontroller.debugdescription) } }}
the print function indicates viewcontrollers in fact dismissed memory usage doesn't go down appropriately. started using "debug memory graph". that's 1 example got: can see, can't find hints memory leaks related to. can't tell graph.
using app more , more gave me memory leaks related following: corefoundation, libswiftcore.dylib , foundation.
i'm lost , don't know how proceed debugging these leaks there no additional information me pinpoint cause/swift file causing leaks.
ps: i'm not sole developer on project. i'm pretty carrying out work after previous developer , i've seen bad coding practices on place. rewriting isn't feasible option.
in past i've used instruments debug memory leaks. read apple docs figure out how use instruments , pretty helpful -- first section: to memory leaks. found leaks wasn't able figure out using debug memory graph.
Comments
Post a Comment