热更新管理器里面为什么要用到retain release 其他地方怎么不用这个,这东西干嘛啊

this._am = new jsb.AssetsManager(this.manifestUrl, storagePath);
this._am.retain();

http://www.cnblogs.com/steven66/p/5235790.html

jsb.AssetsManager是c++层提供的对象,他不像普通的node节点,普通节点addChild后引用计数会加1,不会被释放掉。AssetsManager实例化后,并没有能力挂接在UI树上,使用retain函数引用加1才不会导致对象在下一帧被回收。

1赞