iOS libsystem_c.dylib strdup memory leak NSZombie not working

后端 未结 2 1290
失恋的感觉
失恋的感觉 2021-02-04 16:57

Please help me track down an iOS memory leak. Thanks!

I\'m using xCode 4.0.1 and I tried to activate NSZombie to track a memory leak, but it doesn\'t seems to work as be

2条回答
  •  不要未来只要你来
    2021-02-04 17:29

    You can see where it was allocated if you do this:

    1. Go to Product -> Edit Scheme -> Run (Debug) -> Arguments.
    2. Add this to environment variables: MallocStackLoggingNoCompact
    3. Set it to YES
    4. Run, and let it crash.
    5. type in console (gdb) info malloc 0x4c8600 or whatever the address is.

提交回复
热议问题