docs: private boolean cleanLockedObjects( LockedObject lo,
                                          boolean temporary ) {
  
          if (lo.children == null) {
              if (lo.owner == null) {
                  if (temporary) {
                      lo.removeTempLockedObject();
                  } else {
                      lo.removeLockedObject();
                  }
  
                  return true;
              }
              return false;
          }
          boolean canDelete = true;
          int limit = lo.children.length;
          for (int i = 0; i < limit; i++) {
              if (!cleanLockedObjects(lo.children[i], temporary)) {
                  canDelete = false;
              } else {
  
                  // because the deleting shifts the array
                  i--;
                  limit--;
              }
          }
          if (canDelete) {
              if (lo.owner == null) {
                  if (temporary) {
                      lo.removeTempLockedObject();
                  } else {
                      lo.removeLockedObject();
                  }
                  return true;
              }
              return false;
          }
          return false;
      }