Commit 7a1f33c3 authored by GauthamBanasandra's avatar GauthamBanasandra Committed by Rich Trott
Browse files

src: add public virtual destructor for KVStore

As KVStore has derived classes, it is essential to
declare a public virtual destructor in the base
KVStore class. Otherwise, deleting derived class
instances using base class pointers would
potentially cause undefined behaviour.

Additionally, since we are implementing a non-default
destructor, the special member functions have also
been implemented in order to abide by the rule of five.

PR-URL: https://github.com/nodejs/node/pull/28737


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
parent 49144ab6
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment