I have some memory leaks in my project, it seems like a closure or cycle reference issue, but I only have memory address.
How can I find certain function or closer that causes memory leaky by memory address?
---------Update ---------
Thanks to @DarkDust, the info of memory address is under inspector tab.
CodePudding user response:
Edit your scheme, select the "Run" section on the left and then the "Diagnostics" tab. Here, enable "Malloc Stack Logging" (you may need to disable runtime sanitizers if this option is greyed out).
Then run your app again. You can now view a stack trace generated at the time a specific memory area was allocated in the inspector.
See for example this tutorial or this one.