Hi, I'm investigating the code, and for someone not familiar with it, it's very complex.
On com.sun.javafx.tk.quantum.WindowStage it will do this when changing scene: if (oldScene != null) { ViewPainter painter = ((ViewScene)oldScene).getPainter(); QuantumRenderer.getInstance().disposePresentable(painter.presentable); // latched on RT } But not when closing the Sage (possible problem #1). When changing scenes, ES2SwapChain dispose will be called: public void dispose() { if (stableBackbuffer != null) { stableBackbuffer.dispose(); stableBackbuffer = null; } } But it does not dispose the drawable that should clear the native struc DrawableInfo created, I think (possible problem #2). Does it make sense? -- Thiago. Em ter., 24 de set. de 2024 às 14:10, Thiago Milczarek Sayão < thiago.sa...@gmail.com> escreveu: > I might be mistaken, but it seems deleteDrawableInfo is never called. > > I think it should be called when the platform View is replaced or when the > window is closed. > > Github search for deleteDrawableInfo > > https://github.com/search?q=repo%3Aopenjdk%2Fjfx%20deleteDrawableInfo&type=code > > Em ter., 24 de set. de 2024 às 09:07, Thiago Milczarek Sayão < > thiago.sa...@gmail.com> escreveu: > >> Hi, >> >> While doing some work on replacing GLX with EGL I discovered a possible >> leak. >> >> Running this test: >> gradle -PFULL_TEST=true -PUSE_ROBOT=true :systemTests:test --tests >> SetSceneScalingTest >> >> will result in X11GLDrawable -> nCreateDrawable to be called multiple >> times on the same test, while GLDrawable -> deleteDrawableInfo is never >> called, generating a leak (I think). >> >> I can probably fix this, but I still have little knowledge on the es2 >> part, so any help would be appreciated. >> >> -- Thiago. >> >>