forked from OSchip/llvm-project
[trace] Fix destructor declaration
The destructor must be defined in the implementation class so that it can be called, as Vedant Kumar pointed out in: ''' What were your thoughts, re: +class Trace : public PluginInterface { +public: + ~Trace() override = default; Does this need to be `virtual ~Trace() = ...`? Otherwise, when a std::shared_ptr<Trace> is destroyed, the destructor for the derived TraceIntelPT instance won't run. '''
This commit is contained in:
parent
d94253b52e
commit
92e1ebeaa1
|
@ -35,8 +35,6 @@ namespace lldb_private {
|
|||
/// this information.
|
||||
class Trace : public PluginInterface {
|
||||
public:
|
||||
~Trace() override = default;
|
||||
|
||||
/// Dump the trace data that this plug-in has access to.
|
||||
///
|
||||
/// This function will dump all of the trace data for all threads in a user
|
||||
|
|
|
@ -20,6 +20,8 @@ class TraceIntelPT : public lldb_private::Trace {
|
|||
public:
|
||||
void Dump(lldb_private::Stream *s) const override;
|
||||
|
||||
~TraceIntelPT() override = default;
|
||||
|
||||
/// PluginInterface protocol
|
||||
/// \{
|
||||
lldb_private::ConstString GetPluginName() override;
|
||||
|
|
Loading…
Reference in New Issue