ObjectTracker which is detecting an object's deallocing, when occurs, it proivdes a closure callback. Compatible with both Swift and Objective-C.
pod 'ObjectTracker'
github "janlionly/ObjectTracker"
- 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")),
// your detecting ctrl
ObjectTracker.trackObject(ctrl) { (ctrl) in
print("============= \(ctrl) deinit =============")
}
- iOS 9.0+
- Swift 4.2 to 5.2
Visit my github: janlionly
Contact with me by email: janlionly@gmail.com
I would love you to contribute to ObjectTracker
ObjectTracker is available under the MIT license. See the LICENSE file for more info.