ObjectTracker
Description
ObjectTracker which is detecting an object's deallocing, when occurs, it proivdes a closure callback. Compatible with both Swift and Objective-C.
Installation
CocoaPods
pod 'ObjectTracker'
Carthage
github "janlionly/ObjectTracker"
Swift Package Manager
- iOS: Open Xcode, File->Swift Packages, search input https://github.com/janlionly/ObjectTracker.git, and then select Version Up to Next Major 0.0.1 < .
- Or add dependencies in your
Package.swift
:
.package(url: "https://github.com/janlionly/ObjectTracker.git", .upToNextMajor(from: "0.0.1")),
Usage
// your detecting ctrl
ObjectTracker.trackObject(ctrl) { (ctrl) in
print("============= \(ctrl) deinit =============")
}
Requirements
- iOS 9.0+
- Swift 4.2 to 5.2
Author
Visit my github: janlionly
Contact with me by email: [email protected]
Contribute
I would love you to contribute to ObjectTracker
License
ObjectTracker is available under the MIT license. See the LICENSE file for more info.