Free object in same thread

This commit is contained in:
Martin Raiber 2016-05-15 15:57:49 +02:00
parent 0890fb93d4
commit 9569266e3c
2 changed files with 2 additions and 1 deletions

View File

@ -55,6 +55,7 @@ public:
~ScopedFreeObjRef()
{
delete ref;
ref = NULL;
}
private:

View File

@ -158,7 +158,6 @@ ServerChannelThread::ServerChannelThread(ClientMain *client_main, const std::str
ServerChannelThread::~ServerChannelThread(void)
{
delete settings;
Server->destroy(mutex);
}
@ -168,6 +167,7 @@ void ServerChannelThread::operator()(void)
lasttime=0;
settings=new ServerSettings(Server->getDatabase(Server->getThreadID(), URBACKUPDB_SERVER), clientid);
ScopedFreeObjRef<ServerSettings*> settings_free(settings);
while(do_exit==false)
{