Remove VirtualRefCounted class; non-virtual <-> virtual casts are not no-ops.
This commit is contained in:
parent
4f82a6c37c
commit
5df59c2f7e
2 changed files with 1 additions and 15 deletions
|
@ -38,14 +38,4 @@ public:
|
|||
|
||||
};
|
||||
|
||||
/**
|
||||
* Base class for ref-counted objects. Used in native compiler in TD for Collections,
|
||||
* user-defined records, closures etc.
|
||||
*/
|
||||
class VirtualRefCounted : RefCounted
|
||||
{
|
||||
public:
|
||||
virtual ~VirtualRefCounted();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,12 +20,8 @@ void RefCounted::decr()
|
|||
if (refcnt == 0) {
|
||||
// size of 0xffff indicates a class with a virtual destructor
|
||||
if (size == 0xffff)
|
||||
delete (VirtualRefCounted*)this;
|
||||
uBit.panic(32);
|
||||
else
|
||||
free(this);
|
||||
}
|
||||
}
|
||||
|
||||
VirtualRefCounted::~VirtualRefCounted()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue