There is no Memoryleak. It is Memory buildup which is due to infinitely growing Document object inside the Console.I added a new Config property to control the size of Console. Default value is 10,000 characters.
Added a new property javaws.cfg.consoleBufferSize with default value of 10000.
// If the User has n't specified config property to control the
// size of Console Buffer, then restrict the size of Console to
// default value (10000). If config property (consoleBufferSize)
// is specified, then use that specific value.
// Remove that many characters in the top so that console will
// hold only fixed number of chars and will not grow infinitely.
// This is to prevent any memory buildup.
// If the value of the config property specified is 0,
// then we will not delete any stuff and allow it to grow.
if ((length > _consoleSize) && (_consoleSize > 0))
_document.remove(0,length - _consoleSize);
length = _consoleSize;