[Lldb-commits] [lldb] 92e1ebe - [trace] Fix destructor declaration
    Walter Erquinigo via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Wed Sep 30 11:25:01 PDT 2020
    
    
  
But what about the case Vedant mentioned?
>    Otherwise, when a std::shared_ptr<Trace> is destroyed, the destructor for the derived TraceIntelPT instance won't run.
Or is C++ smart enough to pick the destructor from TraceIntelPT class in this case? 
On 9/30/20, 5:56 AM, "Pavel Labath" <pavel at labath.sk> wrote:
    On 29/09/2020 22:09, Walter Erquinigo via lldb-commits wrote:
    > The destructor must be defined in the implementation class so that it
    > can be called
    That doesn't sound right. Each class automatically gets a destructor if
    it does not declare one itself. "~Foo() override = default" is
    completely equivalent to omitting the destructor completely, if the base
    destructor is virtual (which is true in this case, because the classes
    inherit from PluginInterface).
    pl
    
    
More information about the lldb-commits
mailing list