----- Original Message ----- From: "Thomas DeWeese" <[EMAIL PROTECTED]>
To: "Batik Users" <batik-users@xml.apache.org>
Sent: Friday, February 18, 2005 1:01 PM
Subject: Re: suspendProcessing() and dispose() memory leak



Hi Thomas,

Hi Lukasz,

Lukasz Matuszczak wrote:

I am still fighting with "dispose()" problems, and I discovered something, which I consider a bug (it appears in 1.5.1 release and in a latest version from CVS head).
The problem is when I call method "suspendProcessing()" followed by "dispose()" on JSVGCanvas object,
the JSVGCanvas won't be collected by garbage collector. This is somehow connected with UpdateManager ant its RunnableQueue, I think.

This is tied to the following bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=30189

I think I have a solution to this bug.  This makes it clear
why suspend/dispose isn't shutting down the UpdateManager Thread
properly, but I am unsure why this would prevent GC (this is
also troubling).  My fix for the suspend/resume race condition
does allow the Canvas to go to GC.

Thank you very much, Thomas, your solution seems to work.

   One question on this, what events should be sent?  when
suspend and resume are called in close proximity (i.e. before
the runnable thread actually suspends).  Right now no thread
events get sent (just like if you call resume when the thread
is already running).

I think when we call suspend or resume we should always get managerSuspended and managerResumed events respectively, even if they are called in close proximity
(unless the manager fails). Does it work this way in a current solution?


Best regards,
Lukasz




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to