Dialog uses jcef to create a browser, close dialog, how to release jbcef


1、Use dialogwrapper to create a dialog, add jbcef browser。when open a dialog ,i new a jbcef browser

2、after closing the window, how to close or release jbcef resources, otherwise it will always be displayed in the resource manager(see the picture1  where jcef helper)

3、why there are so many openjdk platform binary .it will cost ram(picture 2)

Comment actions Permalink

Use com.intellij.openapi.Disposable feature: https://plugins.jetbrains.com/docs/intellij/disposers.html
register JCEF instance like this in your DialogWrapper

Disposer.register(myDisposable, <thingToDispose>);
Comment actions Permalink

Yann Cebron i found that dialog closed will use disposed method.so i use jcefbrowser.disposed in the method . it can resolve the question .But i will try your method too.
But it can not resolve the 3th question.the openjdk cost many ram.(int the 2th picture).what can i do?

also,there is the 4th question.when idea plugin start ,it will appear jecf helper for 4 times.(see the first picture)i debug the code findthat i new jcefBrowser in toolwindow ,it will appear jcef helper for two times.i do not know what happen .do you have any idea?
wish for your application for the question of 3,4.


Please sign in to leave a comment.