code: public boolean unsetReference(ServiceReference<T> reference) {
          ReferenceTuple<T> previous = null;
          ReferenceTuple<T> newTuple = null;
  
          // Try this until we either manage to make our update or we know we don't have to
          do {
              // Get the current tuple
              previous = tuple.get();
  
              // If we have something to do.. 
              if (reference == previous.serviceRef) {
                  newTuple = new ReferenceTuple<T>(previous.context, null, null);
              } else {
                  break; // break out. Nothing to see here.
              }
  
              // Try to save the new tuple: retry if someone changed the value meanwhile
          } while (!tuple.compareAndSet(previous, newTuple));
  
          return newTuple != null;
      }
docs: Clear the service reference associated with this service. This first
  checks to see whether or not the reference being unset matches the
  current reference. For Declarative Services dynamic components: if a replacement
  is available for a dynamic reference, DS will call set with the new
  reference before calling unset to clear the old one.
  
  @param reference ServiceReference associated with service to be unset.
  @return true if a non-null value was replaced