|Re: Infinity job to refresh UI leads to memory leak [message #535152 is a reply to message #535009]
||Fri, 21 May 2010 12:33
| Paul Webster
Registered: July 2009
> Yes, it will. But is the problem in it ? I need this loop only for
> emulating user update button click (this loop only for quick reproduce
> problem). Without this loop i've got Out Of Memory too after many times
> update button clicking...
Maybe I misunderstand, but basically you need to do short, UI related
work on the UI thread, and whatever other work you are doing on your
second thread. In your real app, you are getting to the end of a Job
and then posting a display,asyncExec(*) right?
You cannot have that loop you posted in the UI thread, even for an
example, or the UI thread will never process any more asyncExecs(*),
since they're done in the display.readAndDispatch() method and your
loop prevents it from returning to that method.
Powered by FUDForum
. Page generated in 0.02596 seconds