Delete when ref-count goes to 1, not 2\!

This commit is contained in:
Michal Moskal 2015-10-27 08:19:56 -07:00
parent c1050df0d9
commit 6437e714fa

View file

@ -42,7 +42,7 @@ void RefCounted::decr()
return;
refCount -= 2;
if (refCount == 2) {
if (refCount == 1) {
free(this);
}
}