简体   繁体   English

AngularJS jQuery内存泄漏

[英]Angularjs Jquery memory leak

My web application is developed using the jQuery and Angularjs. 我的Web应用程序是使用jQuery和Angularjs开发的。

I am searching for pattern which would cause memory leak in angularjs. 我正在寻找会导致angularjs内存泄漏的模式。

Tools to find memory leak. 查找内存泄漏的工具。 chrome profiler is good, but didnt find any example using angularjs. chrome profiler很好,但是没有找到使用angularjs的示例。

Any angular specific tutorial which will help me to find & fix the memory leak. 任何特定于角度的教程都可以帮助我查找和修复内存泄漏。 Pattern in angularjs which would cause memory leak. angularjs中的模式,这会导致内存泄漏。

Some to get you started: 一些让您入门的方法:

  • Running from AngularJS Memory Leaks 从AngularJS内存泄漏运行
  • Chrome extension: Angular watchers to track the number of watchers. Chrome扩展程序: Angular观察者可跟踪观察者的数量。 If it keeps going up when it shouldn't, that's one form of leak (it may indicate scopes not being destroyed when they should be). 如果它在不应该出现的时候持续上升,那是泄漏的一种形式(它可能表明示波器在应该被损坏时并未被破坏)。
  • You can steal my gl.debugutils module from this Plunkr - just take the debugUtils.js file. 你可以偷我的gl.debugutils从模块这个Plunkr -只取debugUtils.js文件。 It is not foolproof, but it does allow you to display a decent breakdown of statistics about watches inside your app. 它不是万无一失的,但它确实允许您在应用程序中显示有关手表的统计数据的细目分类。 To use it, type printWatchStats() on the console. 要使用它,请在控制台上键入printWatchStats()
  • Learn how to decipher the Record Heap Allocations profile in Chrome devtools. 了解如何在Chrome devtools中解密“记录堆分配”配置文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM