add a function to reset a Handle

This commit is contained in:
Sébastien Loriot 2019-10-09 18:06:30 +02:00
parent 9694f5b1ce
commit 153832fbba
1 changed files with 9 additions and 0 deletions

View File

@ -75,6 +75,15 @@ class Handle
return *this;
}
void reset()
{
if (PTR)
{
--PTR->count;
PTR=0;
}
}
int
refs() const { return PTR->count; }