Canvas blowing up (was Re: JavaFX Media issues)

John Smith John_Smith at
Fri Aug 9 11:12:51 PDT 2013

This question was recently asked on StackOverflow as well: "How can I free Canvas memory?"
So others have been running into these kind of issues.

Also the proposed clear() or empty() option only applies to Canvas correct? 
i.e. WritableImages don't suffer from these kind of issues and don't require such methods?


-----Original Message-----
From: openjfx-dev-bounces at [mailto:openjfx-dev-bounces at] On Behalf Of Richard Bair
Sent: Friday, August 09, 2013 9:43 AM
To: Dr. Michael Paus
Cc: openjfx-dev at
Subject: Re: Canvas blowing up (was Re: JavaFX Media issues)

> What would be the performance penalty for using this quick-fix? The 
> clear/fill commands do not just clear the command buffer. They also 
> fill the canvas area with a certain color. So in normal operation the canvas is always filled twice for each frame, isn't it?

That would be correct. Another option is to add, instead of "clear()" an explicit "empty()" method or something that would just blow away the buffer.


More information about the openjfx-dev mailing list