public CompletableFuture<Void> destroy(){
  CompletableFuture<Void> ret;
  if (controllerProxy != null) {
    ret=controllerProxy.destroy();
    controllerProxy=null;
  }
 else {
    ret=new CompletableFuture<>();
    ret.complete(null);
  }
  return ret;
}

public CompletableFuture < Void > destroy ( ) { CompletableFuture < Void > ret ; if ( controllerProxy != null ) { ret = controllerProxy . destroy ( ) ; controllerProxy = null ; } else { ret = new CompletableFuture < > ( ) ; ret . complete ( null ) ; } return ret ; }
by calling this method the mvc group will be destroyed . this means that the controller instance on the server will be removed and the model that is managed and synchronized between client and server will be detached . after this method is called the view should not be used anymore . it ' s important to call this method to remove all the unneeded references on the server .
