docs: update resources API docs
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# DecrementRefCount
|
||||
|
||||
减少资源的引用计数。
|
||||
|
||||
## 方法签名
|
||||
|
||||
```cpp
|
||||
void DecrementRefCount(ResourceGUID guid);
|
||||
```
|
||||
|
||||
## 详细描述
|
||||
|
||||
原子地减少指定资源的引用计数。引用计数不会减少到 0 以下。如果节点不存在或引用计数已为 0,则不做任何操作。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `guid` | `ResourceGUID` | 目标资源的全局唯一标识符 |
|
||||
|
||||
## 返回值
|
||||
|
||||
无
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
graph.IncrementRefCount("texture"_guid);
|
||||
graph.IncrementRefCount("texture"_guid);
|
||||
graph.DecrementRefCount("texture"_guid); // refCount 现在为 1
|
||||
graph.DecrementRefCount("texture"_guid); // refCount 现在为 0
|
||||
```
|
||||
Reference in New Issue
Block a user