mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
binpac: Add virtual dtor to RefCount base class.
The code generated for types w/ &refcount will subclass RefCount and Unref definitely deletes via a pointer to that base class so it needs a virtual dtor.
This commit is contained in:
parent
4d7de63ef0
commit
13e14768da
1 changed files with 1 additions and 0 deletions
|
@ -150,6 +150,7 @@ class RefCount
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RefCount() { count = 1; }
|
RefCount() { count = 1; }
|
||||||
|
virtual ~RefCount() {}
|
||||||
void Ref() { ++count; }
|
void Ref() { ++count; }
|
||||||
int Unref() { BINPAC_ASSERT(count > 0); return --count; }
|
int Unref() { BINPAC_ASSERT(count > 0); return --count; }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue