code: void replaceC4Document(C4Document c4doc) {
          synchronized (lock) {
              final C4Document oldDoc = this.c4doc;
              this.c4doc = c4doc;
              if (oldDoc != this.c4doc) {
                  if (this.c4doc != null) { this.c4doc.retain(); }
                  if (oldDoc != null) {
                      oldDoc.release();  // oldDoc should be retained.
                  }
              }
          }
      }
docs: ---------------------------------------------