Commit 1eb5dae
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: nodejs#28737
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>1 parent ec1bd00 commit 1eb5dae
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
612 | 619 | | |
613 | 620 | | |
614 | 621 | | |
| |||
0 commit comments