Properly move auto delete flag in insert and remove operations.

git-svn-id: http://voip.null.ro/svn/yate@1495 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2007-11-26 23:52:44 +00:00
parent f3c2c9e516
commit 2e0ffe70e4
1 changed files with 4 additions and 0 deletions

View File

@ -170,7 +170,9 @@ ObjList* ObjList::insert(const GenObject* obj, bool compact)
ObjList *n = new ObjList();
n->set(m_obj);
set(obj,false);
n->m_delete = m_delete;
n->m_next = m_next;
m_delete = true;
m_next = n;
}
else
@ -188,6 +190,8 @@ ObjList* ObjList::append(const GenObject* obj, bool compact)
n->m_next = new ObjList();
n = n->m_next;
}
else
n->m_delete = true;
n->set(obj);
return n;
}