Add virtual destructor to device::Settings

Add virtual destructor to device::Settings since derived classes are
allocated, but are deleted using the base class. This ensures the
descructors of the derived clsses will be executed if present.

Change-Id: I1f974b986193c60128009a768ec6b01b9deeacd5


[ROCm/clr commit: 77268b2e60]
此提交包含在:
Tony Tye committed 2021-01-13 08:24:28 +00:00
1 父節點 efd1f5add1
當前提交 1215c2d51e
1 file changed
+4
+4
查看文件
@@ -609,6 +609,10 @@ class Settings : public amd::HeapObject {
//! Default constructor
Settings();
//! Virtual destructor as this class is used as a base class and is also used
//! to delete the derived classes.
virtual ~Settings() {};
//! Check the specified extension
bool checkExtension(uint name) const {
return (extensions_ & (static_cast<uint64_t>(1) << name)) ? true : false;