Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8092301

Add explicit access to a native resource cleanup function on nodes.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • javafx
    • None

      I've been dealing with some issues trying to get my JavaFX application to run over long periods without consuming all of my native resources. I posted on stackoverflow, (http://stackoverflow.com/questions/15003897/is-there-any-way-to-force-javafx-to-release-video-memory) and was able to work out a semi-functional workaround, but we haven't completely resolved the issue. At the end of the day, as a developer using JavaFX, I am able to determine when I am done with a node and when it's native resources can be released without having to do any type of complex tree processing to determine node visibility states, because I am the one managing the scene. I would like to use this knowledge to be able to invoke some sort of explicit cleanup to force native resource cleanup. I think it's great that JavaFX tries to handle this under the covers, and in many cases this may work great, but I think it has been demonstrated that in extreme use cases, this is not sufficient to ensure system stability.

      As I reference in the stack overflow post, I would be looking for something like the flush method on java.awt.Image, and specifically it's implementation in java.awt.image.VolatileImage.
      http://docs.oracle.com/javase/7/docs/api/java/awt/Image.html#flush()

      This is related to the unresolved issue reported in RT-15516

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported: