<commit_before>package org.realityforge.replicant.client.gwt;

import arez.annotations.ArezComponent;
import com.google.gwt.user.client.Timer;
import javax.annotation.Nonnull;
import javax.inject.Singleton;
import org.realityforge.replicant.client.runtime.DataLoaderEntry;
import org.realityforge.replicant.client.runtime.ReplicantClientSystem;

@Singleton
@ArezComponent
public abstract class GwtReplicantClientSystem
  extends ReplicantClientSystem
{
  private final Timer _timer;

  @Nonnull
  public static GwtReplicantClientSystem create( @Nonnull final DataLoaderEntry[] dataLoaders )
  {
    return new Arez_GwtReplicantClientSystem( dataLoaders );
  }

  GwtReplicantClientSystem( @Nonnull final DataLoaderEntry[] dataLoaders )
  {
    super( dataLoaders );
    _timer = new Timer()
    {
      @Override
      public void run()
      {
        converge();
      }
    };
    _timer.scheduleRepeating( CONVERGE_DELAY_IN_MS );
  }

  @Override
  protected void release()
  {
    cancelTimer();
    super.release();
  }

  private void cancelTimer()
  {
    _timer.cancel();
  }
}<commit_msg>Ensure the timer is disposed when the component is disposed<commit_after>package org.realityforge.replicant.client.gwt;

import arez.annotations.ArezComponent;
import arez.annotations.PreDispose;
import com.google.gwt.user.client.Timer;
import javax.annotation.Nonnull;
import javax.inject.Singleton;
import org.realityforge.replicant.client.runtime.DataLoaderEntry;
import org.realityforge.replicant.client.runtime.ReplicantClientSystem;

@Singleton
@ArezComponent
public abstract class GwtReplicantClientSystem
  extends ReplicantClientSystem
{
  private final Timer _timer;

  @Nonnull
  public static GwtReplicantClientSystem create( @Nonnull final DataLoaderEntry[] dataLoaders )
  {
    return new Arez_GwtReplicantClientSystem( dataLoaders );
  }

  GwtReplicantClientSystem( @Nonnull final DataLoaderEntry[] dataLoaders )
  {
    super( dataLoaders );
    _timer = new Timer()
    {
      @Override
      public void run()
      {
        converge();
      }
    };
    _timer.scheduleRepeating( CONVERGE_DELAY_IN_MS );
  }

  @PreDispose
  final void preDispose()
  {
    cancelTimer();
  }

  private void cancelTimer()
  {
    _timer.cancel();
  }
}
{'fraction_non_alphanumeric': 0.08724534986713905, 'fraction_numerical': 0.0, 'mean_word_length': 4.065022421524664, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5111222', 'n_tokens_mistral': 732, 'n_tokens_neox': 715, 'n_words': 142}