Skip to content

Commit 0996862

Browse files
committed
Merge branch 'master' of https://github.com/Zepo/MLeaksFinder
2 parents 7c89941 + a5372d7 commit 0996862

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

README.md

+8-15
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,30 @@
11
# MLeaksFinder
2-
MLeaksFinder helps you find memory leaks in your iOS apps at develop time. It can automatically find leaks in UIView and UIViewController objects, hit assertion and print the View-ViewController stack when leaks happening. You can also extend it to find leaks in other kinds of objects.
2+
MLeaksFinder helps you find memory leaks in your iOS apps at develop time. It can automatically find leaks in UIView and UIViewController objects, present 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. Besides finding leaks in UIView and UIViewController objects, developers can also extend it to find leaks in other kinds of objects.
33

44
# Communication
55
QQ group: 482121244
66

77
# Installation
8-
- Download MLeaksFinder
9-
- Add MLeaksFinder as a subproject
10-
- Add MLeaksFinder to your Target Dependencies and Link Binary With Libraries
11-
- Click your app's target, then "Build Settings", search for "Other Linker Flags", add '-ObjC'
12-
13-
Or you can simply copy the source files into your project.
14-
15-
## Installation with CocoaPods
168
```
179
pod 'MLeaksFinder'
1810
```
1911

2012
# Usage
21-
MLeaksFinder can automatically find leaks in UIView and UIViewController objects. When leaks happening, it will hit assertion and print the leaked object in its View-ViewController stack.
13+
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.
2214
```
23-
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Possibly Memory Leak.
24-
In case that MyTableViewCell should not be dealloced, override -willDealloc in MyTableViewCell by returning NO.
25-
View-ViewController stack: (
15+
Memory Leak
16+
(
2617
MyTableViewController,
2718
UITableView,
2819
UITableViewWrapperView,
2920
MyTableViewCell
30-
)'
21+
)
3122
```
3223

24+
For the above example, we are sure that objects of `MyTableViewController`, `UITableView`, `UITableViewWrapperView` are deallocated successfully, but not the objects of `MyTableViewCell`.
25+
3326
## Mute Assertion
34-
If your class is designed as singleton or for some reason objects of your class should not be dealloced, override -willDealloc in your class by returning NO.
27+
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.
3528
```objc
3629
- (BOOL)willDealloc {
3730
return NO;

0 commit comments

Comments
 (0)