mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
Fix memory issues for XMLHttpRequest & WebSocket (#12271)
* Add missing addRef for Http relevant classes. * Fix all XMLHttpRequest instances are leak. * Fix unroot logic in jsb_websocket.cpp
This commit is contained in:
@@ -833,6 +833,7 @@ HttpClient::HttpClient()
|
||||
_cookie(nullptr),
|
||||
_requestSentinel(ccnew HttpRequest()) {
|
||||
CC_LOG_DEBUG("In the constructor of HttpClient!");
|
||||
_requestSentinel->addRef();
|
||||
if (gThreadPool == nullptr) {
|
||||
gThreadPool = LegacyThreadPool::newFixedThreadPool(4);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user