Hello,

I am developing a small application that requires an AsyncCallback
call every second. The following implementation generates a fairly
considerable memory leak:

public void onModuleLoad() {
      Timer t = new Timer() {
                  public void run() {
                                greetingService.greetServer(
                                                new AsyncCallback<Integer>() {
                                                        public void 
onFailure(Throwable caught) {
                                                                // Show the RPC 
error message to the user
                                                                
Window.alert("Remote Procedure Call - Failure");
                                                        }

                                                        @Override
                                                        public void 
onSuccess(Integer result) {
                                                                // TODO 
Auto-generated method stub

                                                        }

                                                });
                  }
                };

                t.scheduleRepeating(1000);
        }


-- Client Side GreetingService Interface --

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("greet")
public interface GreetingService extends RemoteService {
        Integer greetServer() throws IllegalArgumentException;
}


What could be causing the memory leak? I'm using GWT 2.0.3.

I'd appreciate any help.

Thanks,
Mike

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to