<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 31, 2015 at 2:53 PM Greg Clayton <<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> On Aug 31, 2015, at 1:34 PM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
><br>
> 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.<br>
><br>
> Should this also be changed to a weak_ptr?<br>
<br>
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. </blockquote></div>