Latest 1.0.2
Homepage https://github.com/HaloWang/WCRetainCycleChecker
License MIT
Platforms ios 7.0, requires ARC
Authors

WCRetainCycleChecker is a tool to check the retain-cycle between UIViewController subclass and proterties it retains.

🇨🇳 中文

How it work?

WCRetainCycleChecker use method swizzling to change the implementation of UIViewController.viewDidDisappear.

Installation

pod 'WCRetainCycleChecker', :configurations => ['Debug']

Then:

cd YOUR_PODFILE_PATH && pod install

After finish it, WCRetainCycleChecker will effect in your project. If your UIViewController subclass has retain-cycle, WCRetainCycleChecker will warn you with following message:

Warning:<RetainedViewController: 0x7fa789f01800> still in memory after `-viewDidDisappear` (2s)

More

You can also use FBRetainCycleDetector in WCRetainCycleChecker.retainCycleFound callback to get more infomation.

There is also a repo called MLeaksFinder which is more powerful than mine 👍.

Latest podspec

{
    "name": "WCRetainCycleChecker",
    "version": "1.0.2",
    "summary": "Check retain-cycle in UIViewController's subclass automatically.",
    "authors": {
        "u738bu7b56": "[email protected]"
    },
    "homepage": "https://github.com/HaloWang/WCRetainCycleChecker",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/HaloWang/WCRetainCycleChecker.git",
        "tag": "1.0.2"
    },
    "source_files": "WCRetainCycleChecker/*.{h,m}",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This