private void clearMNodeInMemory(ICachedMNode node) {
    CacheEntry cacheEntry = getCacheEntry(node);
    if (cacheEntry == null) {
      return;
    }

    if (cacheEntry.isPinned()) {
      memoryStatistics.releasePinnedMemResource(node);
    }
    memoryStatistics.releaseMemResource(node);

    Iterator<ICachedMNode> iterator = getCachedMNodeContainer(node).getChildrenIterator();
    while (iterator.hasNext()) {
      clearMNodeInMemory(iterator.next());
    }
  }
Unpin a node, and if the lock mayer on this node is zero, it will be evictable. Unpin a node
means decrease one mayer lock from the node. If the lock mayer reaches zero, the mayer lock of
its parent should decrease.

@param node
@return
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/memory/MemoryManager.java