Describe the bug
When running several experiments with a permanent output set to a 2D display (for instance, the "3 simulations" experiment of toy model "Ants Foraging", I have noticed a regular increase every time an experiment was closed. An inspection with YourKit reveals that the SwingControl/Java2DDisplaySurface objects are not disposed of, and still referenced by a number of components in the AWT hierarchy (Window, etc.). This issue does not seem to impact "regular" 2D displays (in the output section).
Could be somehow harmless, but several objects in this hierarchy maintain an IGraphicsScope, which itself maintains an AgentsContext full of references to ... agents, which are therefore never garbage collected.
Desktop (please complete the following information):
- OS: macOS 15.4.1 (24E263)
- PC Model: MBP Apple M3 Max
- GAMA version: git
- Java version: JDK 23
- Graphics cards / Display system: Apple M3 Max
Describe the bug
When running several experiments with a
permanentoutput set to a 2D display (for instance, the "3 simulations" experiment of toy model "Ants Foraging", I have noticed a regular increase every time an experiment was closed. An inspection with YourKit reveals that the SwingControl/Java2DDisplaySurface objects are not disposed of, and still referenced by a number of components in the AWT hierarchy (Window, etc.). This issue does not seem to impact "regular" 2D displays (in theoutputsection).Could be somehow harmless, but several objects in this hierarchy maintain an
IGraphicsScope, which itself maintains anAgentsContextfull of references to ... agents, which are therefore never garbage collected.Desktop (please complete the following information):