Fix possible memory leak in LSL bridge

Ansariel 2014-06-20 07:53:52 +02:00
parent a72568e6af
commit ae309e97b2
3 changed files with 16 additions and 8 deletions

View File

@ -222,12 +222,9 @@
}
}
tUUIDs = []; // Free memory
if (llGetListLength(responses) > 0)
{
string body = "<llsd><string>" + llList2CSV(responses) + "</string></llsd>";
responses = []; // Free memory
llHTTPResponse(httpReqID, 200, body);
}
string body = "<llsd><string>" + llList2CSV(responses) + "</string></llsd>";
responses = []; // Free memory
llHTTPResponse(httpReqID, 200, body);
}

View File

@ -67,6 +67,10 @@ FSLSLBridgeRequestResponder::FSLSLBridgeRequestResponder()
//FSLSLBridgeRequestManager::instance().initSingleton();
}
FSLSLBridgeRequestResponder::~FSLSLBridgeRequestResponder()
{
}
//If we get back a normal response, handle it here
void FSLSLBridgeRequestResponder::result(const LLSD& content)
{
@ -89,6 +93,11 @@ void FSLSLBridgeRequestResponder::error(U32 status, const std::string& reason)
FSLSLBridgeRequestRadarPosResponder::FSLSLBridgeRequestRadarPosResponder()
{
}
FSLSLBridgeRequestRadarPosResponder::~FSLSLBridgeRequestRadarPosResponder()
{
}
void FSLSLBridgeRequestRadarPosResponder::result(const LLSD& content)
{
FSRadar* radar = FSRadar::getInstance();

View File

@ -54,7 +54,8 @@ private:
class FSLSLBridgeRequestResponder : public LLHTTPClient::Responder
{
public:
FSLSLBridgeRequestResponder();
FSLSLBridgeRequestResponder();
virtual ~FSLSLBridgeRequestResponder();
//If we get back a normal response, handle it here
virtual void result(const LLSD& content);
//If we get back an error (not found, etc...), handle it here
@ -69,7 +70,8 @@ public:
class FSLSLBridgeRequestRadarPosResponder : public FSLSLBridgeRequestResponder
{
public:
FSLSLBridgeRequestRadarPosResponder();
FSLSLBridgeRequestRadarPosResponder();
virtual ~FSLSLBridgeRequestRadarPosResponder();
//If we get back a normal response, handle it here
void result(const LLSD& content);
};