Understanding a malloc_history dump

后端 未结 2 630
一个人的身影
一个人的身影 2021-02-01 10:00

If you have ever asked how can I debug releasing/alloc issues in objective-c, you will have came across these environment settings that can help track the problem down:

2条回答
  •  不要未来只要你来
    2021-02-01 10:44

    I am no expert, but if you take a look at the first line in block 3:

    ALLOC 0x4dbb170-0x4dbb19f [size=48]:

    While in the other two outputs a memory block of size 18 at 0x4dbb160-0x4dbb171 was allocated and freed. I assume the old object was freed and there is a new object residing at this memory address. Thus the old instance at 0x...b160 is not valid any longer.

提交回复
热议问题