文章来源:淘论文网   发布者: 毕业设计   浏览量: 27



还可以点击去查询以下关键词:
[MLeak]    [定制]    [sFinder]    [MLeak定制sFinder]   

项目介绍:

https://github.com/Zepo/MLeaksFinder

MLeaksFinder

MLeaksFinder helps you find memory leaks in your iOS apps at develop time. It can automatically find leaks in UIView and UIViewController objects, present an alert with the leaked object in its View-ViewController stack when leaks happening. More over, it can try to find a retain cycle for the leaked object using FBRetainCycleDetector. Besides finding leaks in UIView and UIViewController objects, developers can extend it to find leaks in other kinds of objects.

MLeaksFinder可帮助您在开发时查找您的iOS应用程序中的内存泄漏。 它可以自动查找UIView和UIViewController对象中的泄漏,当泄漏发生时,在其View-ViewController堆栈中显示泄漏对象的警报。 更多,它可以尝试使用FBRetainCycleDetector找到泄漏对象的保留周期。 除了在UIView和UIViewController对象中查找泄漏,开发人员可以扩展它以查找其他类型对象中的泄漏。

Communication

QQ group: 482121244

Installationpod 'MLeaksFinder'

MLeaksFinder comes into effect after pod install, there is no need to add any code nor to import any header file.

MLeaksFinder在`pod install'之后生效,不需要添加任何代码或导入任何头文件。

Usage

MLeaksFinder can automatically find leaks in UIView and UIViewController objects. When leaks happening, it will present an alert with the leaked object in its View-ViewController stack.

MLeaksFinder可以自动查找UIView和UIViewController对象中的泄漏。 当泄漏发生时,它将在其View-ViewController堆栈中提供泄漏对象的警报。

Memory Leak ( MyTableViewController, UITableView, UITableViewWrapperView, MyTableViewCell )

For the above example, we are sure that objects of MyTableViewController, UITableView, UITableViewWrapperView are deallocated successfully, but not the objects of MyTableViewCell.

MLeaksFinder can also try to find a retain cycle for the leaked object using FBRetainCycleDetector.

对于上面的例子,我们确信“MyTableViewController”,“UITableView”,“UITableViewWrapperView”的对象被成功解除分配,但不是“MyTableViewCell”的对象。

MLeaksFinder也可以尝试使用FBRetainCycleDetector查找泄漏对象的保留循环。

Retain Cycle ( '-> MyTableViewCell ', '-> _callback -> __NSMallocBlock__ ' )

With the output, we know that the object of MyTableViewCell has a __strong instance variable named _callback, which is of type __NSMallocBlock__. And _callback also has a __strong reference back to MyTableViewCell.

使用输出,我们知道MyTableViewCell的对象有一个名为_callback的__strong实例变量,它的类型为__NSMallocBlock__。 和_callback也有一个__strong引用返回MyTableViewCell。

Mute Assertion

If your class is designed as singleton or for some reason objects of your class should not be dealloced, override - (BOOL)willDealloc in your class by returning NO.

如果你的类被设计为单例,或者由于某些原因你的类的对象不应该被释放,在你的类中重写 - (BOOL)willDealloc,返回NO。

- (BOOL)willDealloc { return NO; }Find Leaks in Other Objects

MLeaksFinder finds leaks in UIView and UIViewController objects by default. However, you can extend it to find leaks in the whole object graph rooted at a UIViewController object.

默认情况下,开题报告,MLeaksFinder在UIView和UIViewController对象中找到泄漏。 但是,论文,您可以扩展它以在基于UIViewController对象的整个对象图中查找泄漏。

- (BOOL)willDealloc { if (![super willDealloc]) { return NO; } MLCheck(self.viewModel); return YES; }


这里还有:


还可以点击去查询:
[MLeak]    [定制]    [sFinder]    [MLeak定制sFinder]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/8450.docx
  • 上一篇:TileSh定制iftView
  • 下一篇:目前主流actionShee毕业设计t效果,类似微信,微博