fix: improve doc link navigation and tree display

- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
This commit is contained in:
2026-03-19 12:44:08 +08:00
parent e003fe6513
commit 58a83f445a
1012 changed files with 56880 additions and 22 deletions

View File

@@ -0,0 +1,39 @@
# RefCounted::Release
```cpp
void Release();
```
减少引用计数。
**描述**
原子地减少引用计数。当引用计数归零时,对象会自动 `delete this`。这是实现自动内存管理的关键方法。
**复杂度:** O(1)(归零时为 O(n)n 为对象大小)
**示例:**
```cpp
#include <XCEngine/Core/RefCounted.h>
class MyObject : public RefCounted {
public:
void DoSomething() { /* ... */ }
};
// 创建对象(构造时 refCount = 1
MyObject* obj = new MyObject();
// 手动增加引用
obj->AddRef(); // refCount = 2
// 释放引用
obj->Release(); // refCount = 1
obj->Release(); // refCount = 0, 对象被自动 delete
```
## 相关文档
- [RefCounted 总览](refcounted.md) - 返回类总览
- [AddRef](AddRef.md) - 增加引用计数