问题
My app seems to be leaking some allocations, at least instruments says so, but it points me to the wrong line of code.
The stack trace in the image bellow, says that btAllignedAllocDefault
is leaking, but it is just a fancy malloc, so the offending line of code must be in initEngine
, the problem is that double-ckicling initEngine
shows the file containing iniEngine
's definition but always point to some arbitrary line in the first function definition it finds in that file.
No mather where I put the supposed offending function initEngine()
, Instruments points to some arbitrary line of code always in the first function it finds in the file that contains the offendig code.
I tryied deleting all the DerivedData, and building both the Release and Debug build configurations.
I've noticed, though, that Xcode never puts the .app bundle and .dSYM file in Debug-iphoneos, but always in Release-iphoneos, even when the Build location settings tell it to do so.
来源:https://stackoverflow.com/questions/20818782/xcode-instruments-leaks-are-shown-in-the-wrong-function