src: add public virtual destructor for KVStore · nodejs/node@74243da · GitHub
Skip to content

Commit 74243da

Browse files
GauthamBanasandratargos
authored andcommitted
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: #28737 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 7b0b06d commit 74243da

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/env.h

Lines changed: 7 additions & 0 deletions

0 commit comments

Comments
 (0)