code: public synchronized static void freeNamedLock(String name) {
          int count = namedLockUseCounts.get(name);
          if (count > 1) {
              namedLockUseCounts.put(name, count - 1);
          } else {
              namedLocks.remove(name);
              namedLockUseCounts.remove(name);
          }
      }
docs: Indicate that an object obtained from {@link #allocateNamedLock(String)} is no longer needed by the caller, so
  it is eligible for garbage collection if no other threads have it allocated.
  
  @param name uniquely identifies some resource to which exclusive access was previously needed