JDK-8120818 : Memory leak with media objects
  • Type: Bug
  • Component: javafx
  • Sub-Component: media
  • Affected Version: fx2.1.1,7u6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-04-20
  • Updated: 2015-06-17
  • Resolved: 2013-07-03
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.
JDK 8
8Fixed
Related Reports
Relates :  
Relates :  
Description
Some of the memory allocated by the media objects (Media, MediaPlayer, MediaView) is not released upon stopping and clearing all references to it.

I've included an example application wich will indefinitly open and close a JDialog which contains a JFXPanel containing a mediaplayer. When you run this you will see that memory consumption slowly rises.

If you try to use dispose on close of the JDialog, memory is released but one can not open the JFXPanel again because the platform has been exited.
Comments
This issue was resolved as part of RT-28817.
03-07-2013

Multiple users have been complaining about Media memory leaks on JavaFX forums: https://forums.oracle.com/forums/thread.jspa?threadID=2472430
08-01-2013

The magnitude of the memory leak, if any will be assessed as part of the investigation for a fix.
19-07-2012

An assessment of how many bytes are leaked would be good to know. This should be part of ILW. Fixing this for Lombard is fine with QE. SQE / OK
19-07-2012

Deferral justification: * Too late for 2.2: possible destabilization risk. * Re-scheduled for Lombard / 3.0. * Little expected user impact.
18-07-2012