Before deleting, make the parent forget.

This commit is contained in:
Axel Naumann 2014-04-14 16:53:39 +02:00 committed by sftnight
parent 362480a7c9
commit c46a539b2f

View File

@ -69,7 +69,12 @@ namespace cling {
assert((T->getState() == Transaction::kCompleted ||
T->getState() == Transaction::kRolledBack)
&& "Transaction must completed!");
if (m_Transactions.size() == POOL_SIZE) {
// Tell the parent that T is gone.
if (T->getParent())
T->getParent()->removeNestedTransaction(T);
// don't overflow the pool
delete T;
return;