Latest 2.0.1
Homepage https://github.com/fastred/DeallocationChecker
License MIT
Platforms ios 8.0, tvos 9.0
Frameworks Foundation, UIKit
Authors

Learn about leaking view controllers without opening Instruments.

Usage

First, import the library using import DeallocationChecker. Then call dch_checkDeallocation() from viewDidDisappear(_:) in your view controllers:

    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)

        dch_checkDeallocation()
    }

If a view controller isn’t deallocated after disappearing for good, an assertion inside dch_checkDeallocation(usingDelay:) will fail:

Failed assertion

At this point we can simply open the Memory Graph Debugger to investigate the reason of a cycle.

Installation

CocoaPods

Add the line pod "DeallocationChecker" to your Podfile

Carthage

Add the line github "fastred/DeallocationChecker" to your Cartfile

Author

Project created by Arek Holko (@arekholko on Twitter).

Latest podspec

{
    "name": "DeallocationChecker",
    "version": "2.0.1",
    "summary": "Learn about leaking view controllers without opening Instruments.",
    "description": "DeallocationChecker asserts that a view controller gets deallocated afternits view is removed from the view hierarchy. When you use the app, you'llnsee assertion failures if your view controllers don't get deallocated.",
    "homepage": "https://github.com/fastred/DeallocationChecker",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Arkadiusz Holko": "[email protected]"
    },
    "social_media_url": "https://twitter.com/arekholko",
    "platforms": {
        "ios": "8.0",
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/fastred/DeallocationChecker.git",
        "tag": "2.0.1"
    },
    "source_files": "Sources/**/*",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This