From a9a905b0d2c2956fd56ebe0ae46fb633baeb0a2d Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Sat, 6 Jan 2018 16:30:26 -0800 Subject: [PATCH] Delete previous QueueManager instance if creating multiple. --- src/queue_manager.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/queue_manager.cc b/src/queue_manager.cc index 6ccda5e7..3132d729 100644 --- a/src/queue_manager.cc +++ b/src/queue_manager.cc @@ -51,6 +51,8 @@ QueueManager* QueueManager::instance() { void QueueManager::CreateInstance(MultiQueueWaiter* querydb_waiter, MultiQueueWaiter* indexer_waiter, MultiQueueWaiter* stdout_waiter) { + if (instance_) + delete instance_; instance_ = new QueueManager(querydb_waiter, indexer_waiter, stdout_waiter); }