Implements a virtual destructor on the BaseRequestHandler class.

Implements a virtual destructor on the BaseRequestHandler class to protect against undefined behavior in
the event that a derived BaseRequestHandler class has a destructor and an object of such derived class
is destroyed through a pointer to its base class.
This commit is contained in:
251 2017-12-29 16:20:28 +01:00
parent d9fdac130a
commit bdb3231bee
1 changed files with 1 additions and 0 deletions

View File

@ -198,6 +198,7 @@ static void http_error_cb(enum evhttp_request_error err, void *ctx)
class BaseRequestHandler
{
public:
virtual ~BaseRequestHandler() {}
virtual UniValue PrepareRequest(const std::string& method, const std::vector<std::string>& args) = 0;
virtual UniValue ProcessReply(const UniValue &batch_in) = 0;
};