After deleting a target, clear the target object and remove orphaned modules.

llvm-svn: 140843
This commit is contained in:
Greg Clayton
2011-09-30 03:29:05 +00:00
parent 2bc22f83ad
commit 753406221b

View File

@@ -614,6 +614,8 @@ 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.Clear();
ModuleList::RemoveOrphanSharedModules();
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));