@ives_xxz/framework 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -381,8 +381,8 @@ export class FWAssetManager extends FWManager implements FW.AssetManager {
381
381
  assetData.refCount--;
382
382
 
383
383
  if (assetData.refCount <= 0) {
384
+ this.resMgr.getBundle(bundleName)?.release(path);
384
385
  this.assetsMap.delete(key);
385
- autoRelease && this.resMgr.getBundle(bundleName)?.release(path);
386
386
  }
387
387
  }
388
388
 
@@ -421,6 +421,9 @@ export class FWAssetManager extends FWManager implements FW.AssetManager {
421
421
  }
422
422
 
423
423
  public onDestroy(): void {
424
+ this.assetsMap.forEach((v) => {
425
+ this.release(v.assetProperty);
426
+ });
424
427
  this.assetsMap.clear();
425
428
  }
426
429
  }
@@ -92,6 +92,9 @@ export class FWBundleManager extends FWManager implements FW.BundleManager {
92
92
  }
93
93
 
94
94
  public onDestroy(): void {
95
+ this.bundleMap.forEach((bundle) => {
96
+ cc.assetManager.removeBundle(bundle);
97
+ });
95
98
  this.bundleMap.clear();
96
99
  }
97
100
  }
@@ -226,6 +226,5 @@ export class FWResManager extends FWManager implements FW.ResManager {
226
226
  public onDestroy(): void {
227
227
  this.assetMgr.onDestroy();
228
228
  this.bundleMgr.onDestroy();
229
- cc.assetManager.releaseAll();
230
229
  }
231
230
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ives_xxz/framework",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "cocoscreator 2.x mvc framework",
5
5
  "main": "index.js",
6
6
  "keywords": [