This happens in the unit tests and needs to be reconciled because it will likely become a problem later. When auto worker = new AMQPWorker(...) is called, it should later be possible to delete worker. This doesn't work correctly in the setup fixture class in tests/agent_t.cpp.