Sounds good.  I already have that working in a local patch, but I will wait
for the fix you described earlier to go in first, and handle the merge and
check in the weak_ptr change.

On Mon, Aug 31, 2015 at 2:53 PM Greg Clayton <gclay...@apple.com> wrote:

>
> > On Aug 31, 2015, at 1:34 PM, Zachary Turner <ztur...@google.com> wrote:
> >
> > Windows plugin holds a strong reference to itself.  It calls
> shared_from_this() when the process is launched, and it releases this
> strong reference after a process exits.  It does this because the debug
> loop happens in a different thread, and it wanted to ensure that the
> process plugin cannot be killed before we've cleaned up gracefully.
> >
> > Should this also be changed to a weak_ptr?
>
> I would change it to a std::weak_ptr if possible. That way if the plug-in
> goes away, you will try to lock the weak pointer and notice the shared
> pointer is NULL and know the process is gone and you can proceed to shut
> down this extra thread.
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to