code: public void unsubscribe (DObjectManager omgr)
      {
          if (!_active) {
              // we may be non-active and have no object which could mean
              // that subscription failed; in which case we don't want to
              // complain about anything, just quietly ignore the
              // unsubscribe request
              if (_object == null && !_pending) {
                  return;
              }
              log.warning("Inactive safesub asked to unsubscribe " + this + ".", new Exception());
          }
  
          // note that we no longer desire to be subscribed
          _active = false;
  
          if (_pending) {
              // make sure we don't have an object reference
              if (_object != null) {
                  log.warning("Incroyable! A safesub has an object and is " +
                              "pending!? " + this + ".", new Exception());
              } else {
                  // nothing to do but wait for the subscription to complete
                  // at which point we'll pitch the object post-haste
                  return;
              }
          }
  
          // make sure we have our object
          if (_object == null) {
              log.warning("Zut alors! A safesub _was_ active and not " +
                          "pending yet has no object!? " + this + ".", new Exception());
              // nothing to do since we're apparently already unsubscribed
              return;
          }
  
          // clear out any listeners we added
          for (ChangeListener listener : _listeners) {
              _object.removeListener(listener);
          }
  
          // finally effect our unsubscription
          _object = null;
          omgr.unsubscribeFromObject(_oid, this);
      }
docs: Terminates the object subscription. If the initial subscription has
  not yet completed, the desire to terminate will be noted and the
  subscription will be terminated as soon as it completes.