Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polymorphic classes not using a virtual destructor #3759

Closed
sidhujag opened this issue Oct 2, 2020 · 1 comment
Closed

polymorphic classes not using a virtual destructor #3759

sidhujag opened this issue Oct 2, 2020 · 1 comment

Comments

@sidhujag
Copy link

sidhujag commented Oct 2, 2020

I get a bunch of warnings on these classes for not having a virtual destructor for BLSWrapper:

https://github.com/dashpay/dash/blob/master/src/bls/bls.h#L34

You should consider adding virtual dtors for CBLSWrapper, it may mean derived classes aren't deleted if base class pointer is deleted.

@sidhujag sidhujag changed the title polymorphic classes not defining virtual destructors polymorphic classes not using a virtual destructor Oct 3, 2020
@PastaPastaPasta
Copy link
Member

Hey @sidhujag, sounds reasonable, feel free to open a PR and we can evaluate it

rkarthik2k21 added a commit to rkarthik2k21/dash that referenced this issue Jul 28, 2021
Add virtual destructors for CBLSWrapper and CBLSLazyWrapper
UdjinM6 added a commit that referenced this issue Jul 28, 2021
* Fixes issue #3759

Add virtual destructors for CBLSWrapper and CBLSLazyWrapper

* Fix linter errors

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
gades pushed a commit to cosanta/cosanta-core that referenced this issue May 11, 2022
…4298)

* Fixes issue dashpay#3759

Add virtual destructors for CBLSWrapper and CBLSLazyWrapper

* Fix linter errors

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants