|
|
|
|
|
|
|
Re: Infinity job to refresh UI leads to memory leak [message #535152 is a reply to message #535009] |
Fri, 21 May 2010 12:33 |
|
Andrew wrote:
> 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.
PW
--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
Powered by
FUDForum. Page generated in 0.64045 seconds