Breakpoint pointing out “objc_autoreleaseNoPool”

前端 未结 3 499
温柔的废话
温柔的废话 2021-01-31 11:36

So I\'m debugging an app in preperation for its app so release, and I enabled a universal breakpoint for "All Exceptions". Since then, everytime I run the app, the co

3条回答
  •  梦谈多话
    2021-01-31 11:50

    Many of the methods in the cocoa api return autoreleased objects. In particular, those methods that return an object that don't begin with init, such as [NSNumber numberWithLong:]. If you don't have an autorelease pool in place, those objects will be leaked. You can find more information on using NSAutoreleasePool in the documentation.

提交回复
热议问题