NSAutoReleaseNoPool(): Object 0x********* of class NSConreteData autoreleased with no pool in place
2012-09-12 11:33
573 查看
遇到这个错误log信息的时候,表示内存泄露。
这个泄露是由于多线程的内存autorelease造成的。
我用的方法是
[NSThread
detachNewThreadSelector:@selector(bodyImageBtbClick)
toTarget:self
withObject:nil]; 然后执行时候log提示泄露
我的解决方式是:
在bodyImageBtbClick 这个方法的开始加入一句
NSAutoreleasePool *pool = [[NSAutoreleasePool
alloc] init];
结束加入一句 [pool release];
这样就解决了。
这个泄露是由于多线程的内存autorelease造成的。
我用的方法是
[NSThread
detachNewThreadSelector:@selector(bodyImageBtbClick)
toTarget:self
withObject:nil]; 然后执行时候log提示泄露
我的解决方式是:
在bodyImageBtbClick 这个方法的开始加入一句
NSAutoreleasePool *pool = [[NSAutoreleasePool
alloc] init];
结束加入一句 [pool release];
这样就解决了。
相关文章推荐
- *** __NSAutoreleaseNoPool(): Object 0x6013810 of class __NSArrayI autoreleased with no pool in place
- ARC 工程出现错误__NSAutoreleaseNoPool(): Object 0x8850ce0 of class __NSCFData autoreleased with no pool in
- __NSAutoreleaseNoPool(): ... utoreleased with no pool in place - just leaking
- __NSAutoreleaseNoPool(): ... utoreleased with no pool in place - just leaking
- nsthread autoreleased with no pool in place – just leaking警告的解决方法
- PHP 报错 Object of class mysqli could not be converted to string in
- DataPump Import Of Object Types Fails With Errors ORA-39083 ORA-2304 Or ORA-39117 ORA-39779 (Doc ID
- Recent Evolution of Zero Data Loss Guarantee in Spark Streaming With Kafka
- Android java.lang.NoSuchFieldError: No static field xxx of type I in class Lcom/XX/R$id; or its superclasses
- Your build host version of Xamarin.IOS (release NO.)is too recent to work with the IOS designer
- Object-C中的内存管理 MRC、ARC以及Autoreleasepool的区别
- 二、Java.lang.NoSuchFieldError: No static field xxx of type I in class Lcom/XX/R$id; or
- __week and autorelease pool in ARC in Xcode 4.2
- Unable to find a value for "tStatus" in object of class org.entity.Passport using operator "."
- java.lang.NoSuchFieldError: No static field xxx of type I in class Lcom/XX/R$id; or its superclasses
- webview使用遇到 It is possible that this object was over-released, or is in the process of deallocation错误的解决办法
- fortran Because of COMMON, the alignment of object is inconsistent with its type
- SPRING IN ACTION 第4版笔记-第十一章Persisting data with object-relational mapping-001-使用Hibernate(@Inject、@EnableTransactionManagement、@Repository、PersistenceExceptionTranslationPostProcessor)
- 关于NSAutoreleasePool' is unavailable: not available in automatic reference counting mode
- iOS: Object-C 自动内存管理,活用@autoreleasepool