LeakChecker
Simple memory leak checker based on weak reference examination
Install / Use
/learn @maxoldev/LeakCheckerREADME
LeakChecker
Simple memory leak checker based on weak reference examination.
<img src="demo.gif" width=400 alt="screen record"/>Example
To run the example project, clone the repo, and run pod install from the Example directory first.
Installation
LeakChecker is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'LeakChecker'
Usage
- Activate
LeakChecker.isEnabled = true(eg fromAppDelegate.init) - Use built-in handler
DefaultLeakDetectedHandler.isEnabled = trueor handle notificationNSNotification.Name.LeakChecker.leakDetectedby yourself - Add calls
checkLeak(of:)for all objects may be accidentially retained before their expected deallocation
class YourViewController: UIViewController {
private var viewModel = ViewModel()
deinit {
checkLeak(of: viewModel)
}
Author
Max Sol, maxoldev@gmail.com
License
LeakChecker is available under the MIT license. See the LICENSE file for more info.
<a href="https://www.flaticon.com/free-icons/leak" title="leak icons">Leak icons created by Smashicons - Flaticon</a>
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
