大家有时候会遇到这个错误
- malloc: *** error for object 0x******: incorrect checksum for freed object - object was probably modified after being freed.
- *** set a breakpoint in malloc_error_break to debug
先看下字面意思
对象 0x****** 发生了错误: 对一个已经被释放了的对象进行了不正确的校验. 你可能对已经被系统释放过的对象进行了修改. 请设置一个 malloc_error_break 类型的断点来调试 这个错误
下面总结发生这个错误的常见情况:
1. 使用了已释放的内存
2. 数组越界
3. 发生了资源抢占
具体待续...
来源: http://www.bubuko.com/infodetail-2561430.html