How to resolve a memory leak in GWT?

落爺英雄遲暮 提交于 2019-12-30 02:31:54

问题


What's the best way to resolve a GWT memory leak due to the fact that GWT is compiled in javascript and code is written in JAVA ?


回答1:


I can recommend 2 things:

  1. Read this article
  2. Nullify all references when you done with them.

Good luck!




回答2:


In GWT development mode you can use a Java profiler such as VisualVM or JProfiler (disclaimer: JProfiler is developed by my company) to analyze the heap.

The GWT development mode should show the same leak as well, except for the less likely case that the leak related to the Javascript translation (which would then be a bug in GWT).



来源:https://stackoverflow.com/questions/8970353/how-to-resolve-a-memory-leak-in-gwt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!