Memory leak in RCP Eclipse applications

How can I detect memory leaks in Eclipse RCP applications?

+3
source share
5 answers

You might want to try the memory leak detector that comes with JRockit Mission Control along with the Eclipse MAT . This is a powerful combination. Both tools are free to use for development.

With JRockit Mission Control, you can check a bunch online and see the exact numbers of objects of a certain type that are live, without having to take temporary snapshots. You can immediately see if you have an editor, view, or listener left after the heap after closing View / Editor. This is usually a framework listener, which is stored in your view / editor. Remember that you have to go to Windows-> Preferences-> Memory Leak Detector-> Trend and set the Lowest Heap Usage to report 0.0 for all instances of the object.

alt text http://download.oracle.com/docs/cd/E11035_01/jrockit/intro/wwimages/memleak2.gif

Using MAT, you can use the shortest path to the root of the stream to find the chain that holds the leak object. See below

alt text http://dev.eclipse.org/blogs/memoryanalyzer/files/2008/04/path2gc_all.png

, , /.

+6

- .

eclipse (wiki, blog).

, TPTP .

+3
+1

, - , , eclipse.exe . RCP , , . Unix (, proc)?

( , , ). , eclipse.exe, , , , , . .

, "-Xmx" eclipse.ini( .ini). . -Xmx256m , 256 . , , .

0

( .) , .

: http://www.yourkit.com/

, , , .

, , , , .

: , eclipse.

0

Source: https://habr.com/ru/post/1707753/


All Articles