away3d/away3d-core-fp11 — Issue #162: AssetLibrary Never remove from _assetDictionary
Author: Jeff94
Created: 2011-10-24 22:35:18+00:00
State: open

Hi all, while I was working on some memory leaks, I find this :

private function removeAssetFromDict(asset : IAsset) : void {

if (_assetDictDirty) rehashAssetDict();

if (_assetDictionary.hasOwnProperty(asset.assetNamespace)) {

if (_assetDictionary.hasOwnProperty(asset.name))
// ------> Might be if ( assetDictionary[asset.assetNamespace].hasOwnProperty(asset.name) )

delete _assetDictionary[asset.assetNamespace][asset.name];
}
}

Cheers, Jeff