public void remove(int lookupId){
  ActiveInstances current, next;
  do {
    current=active.get();
    next=current.remove(lookupId);
  }
 while (!active.compareAndSet(current,next));
}

public void remove ( int lookupId ) { ActiveInstances current , next ; do { current = active . get ( ) ; next = current . remove ( lookupId ) ; } while ( ! active . compareAndSet ( current , next ) ) ; }
delete advice by id
