{"id":18609117,"url":"https://github.com/antranapp/leakdetector","last_synced_at":"2025-04-10T22:31:08.176Z","repository":{"id":47420489,"uuid":"312584092","full_name":"antranapp/LeakDetector","owner":"antranapp","description":"A SPM to support finding memory leaks for Swift projects.","archived":false,"fork":false,"pushed_at":"2022-12-29T02:15:55.000Z","size":17363,"stargazers_count":27,"open_issues_count":3,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T05:41:29.429Z","etag":null,"topics":["combine-framework","ios","leak-detection","macos","memory","memory-leak","memory-management","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antranapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-13T13:31:54.000Z","updated_at":"2025-01-10T17:27:14.000Z","dependencies_parsed_at":"2023-01-31T07:45:33.150Z","dependency_job_id":null,"html_url":"https://github.com/antranapp/LeakDetector","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antranapp%2FLeakDetector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antranapp%2FLeakDetector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antranapp%2FLeakDetector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antranapp%2FLeakDetector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antranapp","download_url":"https://codeload.github.com/antranapp/LeakDetector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248309455,"owners_count":21082214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["combine-framework","ios","leak-detection","macos","memory","memory-leak","memory-management","swift"],"created_at":"2024-11-07T03:05:12.582Z","updated_at":"2025-04-10T22:31:03.243Z","avatar_url":"https://github.com/antranapp.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeakDetector\n\n## Introduction\n\n`LeakDetector` is based on the implementation from [leakdetector](https://github.com/duyquang91/leakdetector) packge, which in turn is derived from the implementation of a leak detecktor in [UBER's RIB](https://github.com/uber/RIBs/tree/master/ios/RIBs/Classes/LeakDetector) framework.\n\nIn parallel to a RxSwift-based implementation, `LeakDetectorCombine` uses `Combine` framework to provide Combine-compatible APIs.\n\nI accidently found another implementation of this `LeakDetector` from [LifeCycleKit](https://github.com/ashare80/LifecycleKit) which shares many similar ideas. The implementation in `LifeCycleKit` has much nicer APIs though. So I recommend you to take a look at the implementation of the `LeakDetector` in `LifeCycleKit` as well.  \n\n## Demo\n\nThere is a demo project to demostrate different use cases of the library.\n\n![demo](./Docs/demo.gif)\n\nThis demo app focuses on common mistakes that could lead to retain cycles/memory leaks.\n\n## References:\n\n- RIBs: [https://github.com/uber/RIBs/tree/master/ios/RIBs](https://github.com/uber/RIBs/tree/master/ios/RIBs)\n- LifeCycleKit: [https://github.com/ashare80/LifecycleKit](https://github.com/ashare80/LifecycleKit)\n- You don’t (always) need [weak self]: [https://medium.com/flawless-app-stories/you-dont-always-need-weak-self-a778bec505ef](https://medium.com/flawless-app-stories/you-dont-always-need-weak-self-a778bec505ef)\n- Everything you need to know about Memory Leaks in iOS: [https://medium.com/flawless-app-stories/all-about-memory-leaks-in-ios-cdd450d0cc34](https://medium.com/flawless-app-stories/all-about-memory-leaks-in-ios-cdd450d0cc34)\n- swift-leak-check: [https://github.com/grab/swift-leak-check](https://github.com/grab/swift-leak-check)\n- LifetimeTracker: [https://github.com/krzysztofzablocki/LifetimeTracker](https://github.com/krzysztofzablocki/LifetimeTracker)\n- The Nested Closure Trap: [https://medium.com/flawless-app-stories/the-nested-closure-trap-356a0145b6d](https://medium.com/flawless-app-stories/the-nested-closure-trap-356a0145b6d)\n- When to weakify: [https://jayeshkawli.ghost.io/when-to-weakify/](https://jayeshkawli.ghost.io/when-to-weakify/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantranapp%2Fleakdetector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantranapp%2Fleakdetector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantranapp%2Fleakdetector/lists"}