Destroy a target when it is deleted.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140845 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index f97d3f9..facf0e3 100644
--- a/source/API/SBDebugger.cpp
+++ b/source/API/SBDebugger.cpp
@@ -614,6 +614,7 @@
     {
         // No need to lock, the target list is thread safe
         result = m_opaque_sp->GetTargetList().DeleteTarget (target.m_opaque_sp);
+        target->Destroy();
         target.Clear();
         ModuleList::RemoveOrphanSharedModules();
     }