Destroy a target when it is deleted.

llvm-svn: 140845
This commit is contained in:
Greg Clayton 2011-09-30 04:14:52 +00:00
parent afedc07a9b
commit 3360b411a5
1 changed files with 1 additions and 0 deletions

View File

@ -614,6 +614,7 @@ SBDebugger::DeleteTarget (lldb::SBTarget &target)
{
// 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();
}