//return false但是没调destroy? 而且整个pool固定大小20不合适吧?看js.Pool的实现,超过对象池缓存大小上限的也是直接丢掉,没调用destroy?
let pool = new js.Pool(function (node) {
if (CC_EDITOR) {
return false;
}
if (CC_DEV) {
cc.assert(!node._parent, 'Recycling node\'s parent should be null!');
}
if (!cc.isValid(node)) {
return false;
}
else if (node.getComponent(cc.LabelOutline)) {
return false;
}
return true;
}, 20);