Skip to content

Commit

Permalink
dispose修改
Browse files Browse the repository at this point in the history
  • Loading branch information
zmLiu committed Aug 13, 2014
1 parent e4003d5 commit a64bd4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions StarlingFeathers/src/lzm/starling/entityComponent/Entity.as
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ package lzm.starling.entityComponent
if(entity._parentEntity != this) return entity;

entity._parentEntity = null;

var index:int = _childEntitys.indexOf(entity);
_childEntitys.splice(index,1);

Expand Down Expand Up @@ -203,7 +202,8 @@ package lzm.starling.entityComponent
}
_components = null;

for each (var entity:Entity in _childEntitys) {
while(_childEntitys.length > 0){
var entity:Entity = _childEntitys[0];
entity.removeFromParentEntity();
entity.dispose();
}
Expand Down

0 comments on commit a64bd4e

Please sign in to comment.