mirror of https://github.com/axmolengine/axmol.git
Fixed #12668 : Lua-bindings-manual-network--LuaMinXmlHttpRequest have a memory leak.
This commit is contained in:
parent
cfd9e9cbdf
commit
0a6933cc8c
|
@ -59,6 +59,7 @@ LuaMinXmlHttpRequest::~LuaMinXmlHttpRequest()
|
|||
{
|
||||
_httpHeader.clear();
|
||||
_requestHeader.clear();
|
||||
CC_SAFE_RELEASE_NULL(_httpRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -268,7 +269,7 @@ void LuaMinXmlHttpRequest::_sendRequest()
|
|||
release();
|
||||
});
|
||||
network::HttpClient::getInstance()->sendImmediate(_httpRequest);
|
||||
_httpRequest->release();
|
||||
CC_SAFE_RELEASE_NULL(_httpRequest);
|
||||
retain();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue