JDK-8296364 : Canvas release resources programatically
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: openjfx20
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2022-11-02
  • Updated: 2022-11-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
I use canvases to draw diagrams in my application. They are placed in TabPanes. At one time, there can be more than 20 tabs open. On monitors with high resolution, where much video memory is required, this may generate OutOfMemory exceptions.
It would help if the canvas would have a property to programatically release the memory resources.
I would use this each time the canvas tab is unselected (not visible). Then I would re-activate and re-paint the canvas when the tab is selected.



Comments
We could consider this as a future improvement to the Canvas API.
04-11-2022