Hi, 

 

I want to implement a feature about auto-refresh a table, but the ie memory 
consumes a lot.

 

My code is like this:

 

public void startAutoFlush() {
  UICallBack.activate("AutoFlush");
  Runnable deamon = new Runnable() {
   public void run() {
    while (running) {
     try {
      Thread.currentThread().sleep(1000);  // auto-refresh every 1 second
     } catch (InterruptedException e) {
      e.printStackTrace();
     }
     Runnable runnable = new Runnable() {
      public void run() {
       flush();
      }
     };
     tableViewer.getTable().getDisplay().asyncExec(
       runnable);
    }
   }
  };
  threadDeamon = new Thread(deamon);
  threadDeamon.setDaemon(true);
  threadDeamon.start();
 }

 
public void flush() {
   tableViewer.refresh();
   
  }
 }
 

I use the RAP version 1.1.2-SR2-site-20090218. And test it in IE 7.0. Can you 
tell me why the memory increase so fast? If it is not a good way to implement 
the auto-refresh feature, how to do it? 

 

Thanks a lot!

 

Drop me a line please.

 

Claire

_________________________________________________________________
打工,挣钱,买房子,快来MClub一起”金屋藏娇”!
http://club.msn.cn/?from=10
_______________________________________________
rap-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/rap-dev

Reply via email to