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

[c++] virtual destructors #56

Closed
poul250 opened this issue Dec 2, 2020 · 1 comment · Fixed by #85
Closed

[c++] virtual destructors #56

poul250 opened this issue Dec 2, 2020 · 1 comment · Fixed by #85

Comments

@poul250
Copy link

poul250 commented Dec 2, 2020

In c++ interfaces it is necessarily to add a virtual destructor

class A {
public:
virtual void foo() = 0;
/* code */
virtual ~A() = default;  // = 0;
};

otherwise there will be memory leaks

@Konard
Copy link
Member

Konard commented Feb 28, 2021

I found one more reason to make base destructor virtual.

@Konard Konard linked a pull request Oct 24, 2021 that will close this issue
@Konard Konard closed this as completed in #85 Nov 6, 2021
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

Successfully merging a pull request may close this issue.

2 participants