diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index e65349ddd3a..5e450b0d248 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -272,6 +272,7 @@ namespace CallOpGenericRecvMessageHelper { class DeserializeFunc { public: virtual Status Deserialize(grpc_byte_buffer* buf, int max_message_size) = 0; + virtual ~DeserializeFunc() {} }; template @@ -283,6 +284,8 @@ class DeserializeFuncType GRPC_FINAL : public DeserializeFunc { return SerializationTraits::Deserialize(buf, message_, max_message_size); } + ~DeserializeFuncType() override {} + private: R* message_; // Not a managed pointer because management is external to this };