cocos-enhance-kit/engine/docs/extensions/ccpool/putInPool.js
2022-06-25 00:23:03 +08:00

6 lines
156 B
JavaScript

---------------------------------
var sp = new _ccsg.Sprite("a.png");
this.addChild(sp);
cc.pool.putInPool(sp);
cc.pool.getFromPool(_ccsg.Sprite, "a.png");