diff options
Diffstat (limited to 'src/mongo/db/dbmessage.h')
-rw-r--r-- | src/mongo/db/dbmessage.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mongo/db/dbmessage.h b/src/mongo/db/dbmessage.h index aa74fd59ffb..2f0c6b6645b 100644 --- a/src/mongo/db/dbmessage.h +++ b/src/mongo/db/dbmessage.h @@ -312,16 +312,11 @@ public: * A response to a DbMessage. */ struct DbResponse { - Message* response; + Message response; MSGID responseTo; std::string exhaustNS; /* points to ns if exhaust mode. 0=normal mode*/ - DbResponse(Message* r, MSGID rt) : response(r), responseTo(rt) {} - DbResponse() { - response = 0; - } - ~DbResponse() { - delete response; - } + DbResponse(Message r, MSGID rt) : response(std::move(r)), responseTo(rt) {} + DbResponse() = default; }; void replyToQuery(int queryResultFlags, |