public void register(T object){
  if (invalidated.get()) {
    cleanup(object);
    return;
  }
  objects.add(object);
  if (invalidated.get())   cleanupAll();
}

public void register ( T object ) { if ( invalidated . get ( ) ) { cleanup ( object ) ; return ; } objects . add ( object ) ; if ( invalidated . get ( ) ) cleanupAll ( ) ; }
registers the given object with this sharedobjectmanager such that it is cleaned up once the sharedobjectmanager is invalidated . if the sharedobjectmanager has already been invalidated , the object will be cleaned up immediately .
