From 0073403206f645d76f2e7eb27eb61ef5580c622b Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 2 Dec 2021 07:48:14 -0800 Subject: [PATCH] XdsClient: fix object deletion problem on import (#28254) --- src/core/ext/xds/xds_api.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/ext/xds/xds_api.cc b/src/core/ext/xds/xds_api.cc index 89ab84ac339..679da843086 100644 --- a/src/core/ext/xds/xds_api.cc +++ b/src/core/ext/xds/xds_api.cc @@ -803,7 +803,9 @@ struct EncodingContext { class XdsResourceType { public: // A base type for resource data. - struct ResourceData {}; + struct ResourceData { + virtual ~ResourceData() = default; + }; struct DecodeResult { std::string name;