1234567891011121314151617181920212223242526272829303132 |
- namespace XGame.Framework.Asset
- {
- internal abstract class BaseLoader : System.IDisposable
- {
- private static AssetAsyncPool asyncPool;
- protected AssetAsyncPool AsyncPool
- {
- get
- {
- if (asyncPool == null)
- {
- asyncPool = new AssetAsyncPool()
- {
- AgentLimit = 10
- };
- }
- return asyncPool;
- }
- }
- void System.IDisposable.Dispose()
- {
- OnDispose();
- asyncPool?.Dispose();
- //assetCtrl?.Dispose();
- asyncPool = null;
- //assetCtrl = null;
- }
- protected abstract void OnDispose();
- }
- }
|