All Projects → liangdahong → AMLeaksFinder

liangdahong / AMLeaksFinder

Licence: MIT License
A small tool for automatically detecting the [controller, view memory leak] in the project. 一款用于自动检测项目中【控制器内存泄漏,View 内存泄漏】的小工具,支持 ObjC,Swift。

Programming Languages

objective c
16641 projects - #2 most used programming language
c
50402 projects - #5 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to AMLeaksFinder

Filprofiler
A Python memory profiler for data processing and scientific computing applications
Stars: ✭ 277 (+211.24%)
Mutual labels:  memory, memory-leak
Rxlifecycle
Rx binding of stock Android Activities & Fragment Lifecycle, avoiding memory leak
Stars: ✭ 131 (+47.19%)
Mutual labels:  memory, leak
Memoscope.net
Dump and analyze .Net applications memory ( a gui for WinDbg and ClrMd )
Stars: ✭ 626 (+603.37%)
Mutual labels:  memory, memory-leak
Cr3dov3r
Know the dangers of credential reuse attacks.
Stars: ✭ 1,700 (+1810.11%)
Mutual labels:  leak, leaks
WWWE
💧 Check your email(s) using popular online services to see if it appears in any data-breach
Stars: ✭ 22 (-75.28%)
Mutual labels:  leak, leaks
Nativeleakdetector
Win32 memory leak detector with ETW
Stars: ✭ 30 (-66.29%)
Mutual labels:  memory, leak
Nuxt Memwatch
Quickly watch real-time memory stats of your nuxt app
Stars: ✭ 76 (-14.61%)
Mutual labels:  memory, leak
Mmat
An automatically testing and analysis hprof library for android app (自动分析Android内存泄漏)
Stars: ✭ 137 (+53.93%)
Mutual labels:  memory, memory-leak
Kube Rs
kubernetes rust client and futures controller runtime
Stars: ✭ 613 (+588.76%)
Mutual labels:  runtime, controller
Mysql Magic
dump mysql client password from memory
Stars: ✭ 183 (+105.62%)
Mutual labels:  memory, leak
AppListManager
📱 AppListManager (Android Library) makes managing application and activity lists easy.
Stars: ✭ 59 (-33.71%)
Mutual labels:  memory, leak
mem usage ui
Measuring and graphing memory usage of local processes
Stars: ✭ 124 (+39.33%)
Mutual labels:  memory, memory-leak
BLUELAY
Searches online paste sites for certain search terms which can indicate a possible data breach.
Stars: ✭ 24 (-73.03%)
Mutual labels:  leak, leaks
CodeDroneDIY
The most simple, but working, quadricopter flight controller from scratch, using Arduino Uno/Nano.
Stars: ✭ 68 (-23.6%)
Mutual labels:  controller
bk flutter image
flutter image,降低内存使用
Stars: ✭ 32 (-64.04%)
Mutual labels:  memory
zram manager
No description or website provided.
Stars: ✭ 41 (-53.93%)
Mutual labels:  memory
bbhtm
bare bone Hierarchial Temporal Memory
Stars: ✭ 14 (-84.27%)
Mutual labels:  memory
o1heap
Constant-complexity deterministic memory allocator (heap) for hard real-time high-integrity embedded systems
Stars: ✭ 119 (+33.71%)
Mutual labels:  memory
webkit-input-range-fill-lower
Customize/styles the native HTML input range controls like the ::-ms-fill-lower property on IE - Pure JS
Stars: ✭ 17 (-80.9%)
Mutual labels:  controller
rs-process-memory
A rust library that allows you to read/write into the memory of other processes
Stars: ✭ 63 (-29.21%)
Mutual labels:  memory
     _    __  __ _               _        _____ _           _
    / \  |  \/  | |    ___  __ _| | _____|  ___(_)_ __   __| | ___ _ __
   / _ \ | |\/| | |   / _ \/ _` | |/ / __| |_  | | '_ \ / _` |/ _ \ '__|
  / ___ \| |  | | |__|  __/ (_| |   <\__ \  _| | | | | | (_| |  __/ |
 /_/   \_\_|  |_|_____\___|\__,_|_|\_\___/_|   |_|_| |_|\__,_|\___|_|

介绍

本项目是一款用于自动检测 iOS 项目中【 UIView 和 UIViewController 内存泄漏 】的工具,只需 pod 'AMLeaksFinder' 即可 0 行代码实现自动监控,效果如下,推荐使用 Cocoapods 导入,和 MLeakFinder 的区别可参考 对比 MLeakFinder

English 📔

功能介绍

  • 自动监控 Controller 的泄漏;
  • 自动监控 View 的泄漏;
  • 借助 FBRetainCycleDetector 快速排查泄漏原因 【 ⚠️ 只在 ObjC 上有效 】;
  • 监控到泄漏时支持快速查看泄漏的视图【 ViewController ViewView 的 root View 等】;
  • 更多功能欢迎补充。

Cocoapods

pod 'AMLeaksFinder', '2.1.5',  :configurations => ['Debug']

  • 如果想查看控制器的强引用链,可导入:Facebook 的 FBRetainCycleDetector 框架即可。
pod 'FBRetainCycleDetector', :git => 'https://github.com/facebook/FBRetainCycleDetector.git', :branch => 'main', :configurations => ['Debug']

直接使用

  • 请拖拽 AMLeaksFinder/AMLeaksFinder 文件夹的全部内容到项目

  • 启用禁用 AMLeaksFinder 请参考 AMLeaksFinder.h 的使用说明 (同时 release 下为关闭状态)

    • 打开 MEMORY_LEAKS_FINDER_ENABLED 宏表示启用 AMLeaksFinder

    • 注释 MEMORY_LEAKS_FINDER_ENABLED 宏表示关闭 AMLeaksFinder

    • 如果希望 release 也打开请详看 AMLeaksFinder.h 文件的宏定义(建议不要打开 😄

原理分析

├── AMLeaksFinder
   ├── AMLeaksFinder.bundle
      ├── all@2x.png
      ├── all@3x.png
      ├── leaks@2x.png
      └── leaks@3x.png
   ├── Objects
      ├── Controllers
         ├── Model
            ├── AMMemoryLeakDeallocModel.h
            ├── AMMemoryLeakDeallocModel.m
            ├── AMMemoryLeakModel.h
            └── AMMemoryLeakModel.m
         ├── NeedDealloc
            ├── UINavigationController+AMLeaksFinderSwizzleDealloc.m
            ├── UIPageViewController+AMLeaksFinderSwizzleDealloc.m
            ├── UISplitViewController+AMLeaksFinderSwizzleDealloc.m
            ├── UITabBarController+AMLeaksFinderSwizzleDealloc.m
            ├── UIViewController+AMLeaksFinderSwizzleDealloc.m
            ├── UIWindow+AMLeaksFinderSwizzleDealloc.m
         └── ViewDidLoad
             ├── UIViewController+AMLeaksFinderSwizzleViewDidLoad.m
      └── View
          └── Model
              ├── AMViewMemoryLeakDeallocModel.h
              ├── AMViewMemoryLeakDeallocModel.m
              ├── AMViewMemoryLeakModel.h
              └── AMViewMemoryLeakModel.m
   ├── UI
      ├── AMLeakDataModel.h
      ├── AMLeakDataModel.m
      ├── AMLeakOverviewView.h
      ├── AMLeakOverviewView.m
      ├── AMMemoryLeakView.h
      ├── AMMemoryLeakView.m
      ├── AMMemoryLeakView.xib
      ├── AMSnapedViewViewController.h
      ├── AMSnapedViewViewController.m
      ├── UIViewController+AMLeaksFinderUI.h
      └── UIViewController+AMLeaksFinderUI.m
   └── Uitis
       ├── Controller
          ├── UIViewController+AMLeaksFinderTools.h
          └── UIViewController+AMLeaksFinderTools.m
       └── View
           ├── UIView+AMLeaksFinderTools.h
           └── UIView+AMLeaksFinderTools.m

联系

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].