Fix a memory leak in Handle_with_policy:

A rep that points to another rep is like a handle
So if such a rep gets deleted the reference counter must be decremented
This commit is contained in:
Andreas Fabri 2013-11-14 10:40:49 +01:00 committed by Laurent Rineau
parent 06009bfc03
commit d8da1137cc
1 changed files with 1 additions and 0 deletions

View File

@ -555,6 +555,7 @@ public:
} }
} else { } else {
h.delete_rep( rep); // we have to delete the current rep h.delete_rep( rep); // we have to delete the current rep
tmp->remove_reference();
} }
rep = tmp; rep = tmp;
} }