class MemoryProfiler extends StudioProfiler {

  @Override
  public void stopProfiling(Common.Session session) {
    try {
      // Stop any ongoing allocation tracking sessions (either legacy or jvmti-based).
      trackAllocations(myProfilers, session, false, null);
    }
    catch (StatusRuntimeException e) {
      getLogger().info(e);
    }

    myProfilers.getClient().getMemoryClient().stopMonitoringApp(MemoryStopRequest.newBuilder().setSession(session).build());
  }

  public  MemoryProfiler(@NotNull StudioProfilers profilers);

}