Skip to content

Commit

Permalink
fix list cache gc crash
Browse files Browse the repository at this point in the history
  • Loading branch information
genify committed May 15, 2018
1 parent eb2db54 commit 9391923
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.5.0
--------------------------------------------------------
- BUG修复模块
* 修正 util/cache/list 模块 GC 异常

0.4.9 (2018-04-12)
--------------------------------------------------------
- 功能支持
Expand Down
4 changes: 3 additions & 1 deletion src/util/cache/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,9 @@ NEJ.define([
if (_u._$isString(_key)){
// clear one list
var _list = this._$getListInCache(_key);
_u._$reverseEach(_list,_doClear);
// fix GC bug
_list.splice(0, _list.length);
// _u._$reverseEach(_list,_doClear);
this._$setLoaded(_key,!1);
if (this.__auto){
this.__doGCSchedule();
Expand Down

0 comments on commit 9391923

Please sign in to comment.