mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 18:52:08 +08:00
- 移除多余using语句和空行,统一代码缩进格式 - 优化注释文档中的缩进和对齐格式 - 简化条件语句和方法实现,提升代码可读性 - 重构协程系统相关类的字段和方法定义格式 - 更新架构服务中容器访问方式的实现 - 调整异步操作类的属性和方法组织结构 - [skip ci]
22 lines
657 B
C#
22 lines
657 B
C#
namespace GFramework.Core.Abstractions.pool;
|
|
|
|
/// <summary>
|
|
/// 定义可池化对象的接口,提供对象在池中的生命周期管理方法
|
|
/// </summary>
|
|
public interface IPoolableObject
|
|
{
|
|
/// <summary>
|
|
/// 当对象从池中被获取时调用,用于初始化或重置对象状态
|
|
/// </summary>
|
|
void OnAcquire();
|
|
|
|
/// <summary>
|
|
/// 当对象被释放回池中时调用,用于清理或重置对象状态以便下次使用
|
|
/// </summary>
|
|
void OnRelease();
|
|
|
|
/// <summary>
|
|
/// 当对象池被销毁时调用,用于执行最终的清理工作
|
|
/// </summary>
|
|
void OnPoolDestroy();
|
|
} |