[SERVER-32436] DurableViewCatalog has non-virtual destructor Created: 21/Dec/17  Updated: 30/Oct/23  Resolved: 01/Mar/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.7.3

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: Kyle Suarez
Resolution: Fixed Votes: 0
Labels: neweng, pull-request, read-only-views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

I upgraded my compiler today, and noticed the following warning:

src/mongo/db/views/durable_view_catalog.h:49:7: warning: 'mongo::DurableViewCatalog' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
class DurableViewCatalog {
      ^
1 warning generated.



 Comments   
Comment by Kyle Suarez [ 01/Mar/18 ]

Hi cramaechi,

Your commit's been merged into master and I've closed your pull request. Thank you for contributing to MongoDB!

Cheers,
Kyle

Comment by Githook User [ 01/Mar/18 ]

Author:

{'email': 'cramaechi@me.com', 'name': 'Chibuikem Amaechi', 'username': 'cramaechi'}

Message: SERVER-32436 Add virtual destructor to DurableViewCatalog

Closes #1220.

Signed-off-by: Kyle Suarez <kyle.suarez@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/bf2c0083968557be95316d083ab7c8fa896016d7

Comment by Chibuikem Amaechi [ 28/Feb/18 ]

Hi Ian - A pull request has been opened.

Comment by Ian Whalen (Inactive) [ 23/Feb/18 ]

Pull requests definitely welcome!

Comment by Chibuikem Amaechi [ 17/Jan/18 ]

Hi Everyone,

I am a new server contributor and would like to handle this issue.

Adding an inline virtual destructor to the DurableViewCatalog class header file should resolve this issue.

ex)

// durable_view_catalog.h 
class DurableViewCatalog {
    // ...
    virtual ~DurableViewCatalog() {}
};

Please share your thoughts.

Generated at Thu Feb 08 04:30:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.