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" <pa...@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

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to