GUI, performance: fixed memory/resources leaks on some components rendering

This commit is contained in:
Oleg Agafonov 2024-07-26 03:26:58 +04:00
parent 1f3fad6594
commit 83823acec7
18 changed files with 341 additions and 248 deletions

View file

@ -1487,9 +1487,11 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
if (!liteMode) {
final SplashScreen splash = SplashScreen.getSplashScreen();
if (splash != null) {
Graphics2D g = splash.createGraphics();
if (g != null) {
renderSplashFrame(g);
Graphics2D g2 = splash.createGraphics();
try {
renderSplashFrame(g2);
} finally {
g2.dispose();
}
splash.update();
}