Quantcast
Channel: Cocos中文社区 - 最新帖子
Viewing all articles
Browse latest Browse all 496130

对象池 nodePool,在手机上面报这样的错

$
0
0
if(self.empyPool.size() > 0){
       nodeS = self.empyPool.get();
 }else{
       nodeS = cc.instantiate(self.text);
       self.empyPool.put(nodeS);
 }

好吧,我刚发现问题了,是我这里写错了,我在对象池里找不到的时候,新复制的时候,又给加回对象池了,理解错了,我只需要在下次回收的时候执行put就可以了,抱歉


Viewing all articles
Browse latest Browse all 496130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>