Remove VirtualRefCounted class; non-virtual <-> virtual casts are not no-ops.

This commit is contained in:
Michal Moskal 2015-10-24 21:52:51 -07:00
parent 4f82a6c37c
commit 5df59c2f7e
2 changed files with 1 additions and 15 deletions

View file

@ -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

View file

@ -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()
{
}