private void basicRemoveIndex(int index) {
    Assert.assertHoldsLock(this, true);
    // minimize volatile reads by copying ref to local var
    Profile[] oldProfiles = profiles; // volatile read
    Profile[] newProfiles = new Profile[oldProfiles.length - 1];
    System.arraycopy(oldProfiles, 0, newProfiles, 0, index);
    System.arraycopy(oldProfiles, index + 1, newProfiles, index, newProfiles.length - index);
    profiles = newProfiles; // volatile write
    profilesVersion++;
    if (numActiveProfiles > 0) {
      numActiveProfiles--;
    }
  }
Perform work of removing the given member from this advisor.
geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionAdvisor.java