Delete previous QueueManager instance if creating multiple.

This commit is contained in:
Jacob Dufault 2018-01-06 16:30:26 -08:00
parent 5d4e0a5020
commit a9a905b0d2

View File

@ -51,6 +51,8 @@ QueueManager* QueueManager::instance() {
void QueueManager::CreateInstance(MultiQueueWaiter* querydb_waiter, void QueueManager::CreateInstance(MultiQueueWaiter* querydb_waiter,
MultiQueueWaiter* indexer_waiter, MultiQueueWaiter* indexer_waiter,
MultiQueueWaiter* stdout_waiter) { MultiQueueWaiter* stdout_waiter) {
if (instance_)
delete instance_;
instance_ = new QueueManager(querydb_waiter, indexer_waiter, stdout_waiter); instance_ = new QueueManager(querydb_waiter, indexer_waiter, stdout_waiter);
} }