emmenlau commented on pull request #2281: URL: https://github.com/apache/thrift/pull/2281#issuecomment-730414864
> > Base classes generally should have virtual destructors > > ... whenever you're using runtime polymorphism — not in general. > > For this code to work correctly, yes, `TException` dtor must be virtual. > > ... Does this solve a specific problem you have? Just asking. No, it was found only by chance because we have some exceptions that inherit from exceptions that inherit from `TException`. The static analyzer warned that the base class was not virtual and resources may be leaked. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
