Delete when ref-count goes to 1, not 2\!
This commit is contained in:
parent
c1050df0d9
commit
6437e714fa
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ void RefCounted::decr()
|
|||
return;
|
||||
|
||||
refCount -= 2;
|
||||
if (refCount == 2) {
|
||||
if (refCount == 1) {
|
||||
free(this);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue