Fixed #12668 : Lua-bindings-manual-network--LuaMinXmlHttpRequest have a memory leak.

This commit is contained in:
Vincent Yang 2015-07-14 10:46:17 +08:00
parent cfd9e9cbdf
commit 0a6933cc8c
1 changed files with 2 additions and 1 deletions

View File

@ -59,6 +59,7 @@ LuaMinXmlHttpRequest::~LuaMinXmlHttpRequest()
{ {
_httpHeader.clear(); _httpHeader.clear();
_requestHeader.clear(); _requestHeader.clear();
CC_SAFE_RELEASE_NULL(_httpRequest);
} }
/** /**
@ -268,7 +269,7 @@ void LuaMinXmlHttpRequest::_sendRequest()
release(); release();
}); });
network::HttpClient::getInstance()->sendImmediate(_httpRequest); network::HttpClient::getInstance()->sendImmediate(_httpRequest);
_httpRequest->release(); CC_SAFE_RELEASE_NULL(_httpRequest);
retain(); retain();
} }