NOAA-OWP / ngen

Next Generation Water Modeling Engine and Framework Prototype
Other
84 stars 63 forks source link

BMI adapter destructors are not entirely virtual #747

Closed program-- closed 7 months ago

program-- commented 8 months ago

Currently, the BMI_Adapter class does not define a destructor, in any capacity. However, the AbstractCLibAdapter defines a virtual destructor that is overridden (but not explicitly with override) in its subclasses (C++, C, Fortran adapters).

Moreover, the BMI Python Adapater class does not define a destructor. Therefore, python models' finalize() method is never called.

Current behavior

BMI_Adapter does not define a destructor.

Expected behavior

BMI_Adapter should define a virtual destructor, and all children classes should override it explicitly with override.