We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//Slot::_onClear中的一段代码
std::vector<std::pair<void*, DisplayType>> disposeDisplayList; for (const auto& pair : this->_displayList) { if ( pair.first != nullptr && pair.first != _rawDisplay && pair.first != _meshDisplay && std::find(disposeDisplayList.cbegin(), disposeDisplayList.cend(), pair) == disposeDisplayList.cend() ) { disposeDisplayList.push_back(pair); } } for (const auto& pair : disposeDisplayList) { if (pair.second == DisplayType::Armature) { static_cast<Armature*>(pair.first)->returnToPool(); } else { _disposeDisplay(pair.first, true); } } if (_meshDisplay && _meshDisplay != _rawDisplay) { _disposeDisplay(_meshDisplay, false); } if (_rawDisplay) { _disposeDisplay(_rawDisplay, false); }
代码相比于5.0版本增加了这个参数,但是这个参数是否还未起作用呢?我看CCSlot中的方法实现并没有根据这个参数进行一些逻辑判断。如果我没猜错的话,这个修改的本意是将上面代码中pair.first != _rawDisplay && pair.first != _meshDisplay 去掉,并且CCSlot中根据isRelease去判断是否释放该display对象
The text was updated successfully, but these errors were encountered:
你好,该参数是全平台都带着的参数,目的是区分是要最终释放,还是持有减一,通常引擎都没有持有减一的功能(除了 cocos2dx),只有最终释放,所以这个参数对 cocos2dx 没用
Sorry, something went wrong.
No branches or pull requests
//Slot::_onClear中的一段代码
代码相比于5.0版本增加了这个参数,但是这个参数是否还未起作用呢?我看CCSlot中的方法实现并没有根据这个参数进行一些逻辑判断。如果我没猜错的话,这个修改的本意是将上面代码中pair.first != _rawDisplay && pair.first != _meshDisplay 去掉,并且CCSlot中根据isRelease去判断是否释放该display对象
The text was updated successfully, but these errors were encountered: