Skip to content

Commit 7f79a92

Browse files
authored
Make RefCountersImpl::SelfDestroy virtual to fix #704 (#705)
1 parent 6414a66 commit 7f79a92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Common/interface/RefCountedObjectImpl.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace Diligent
4343
{
4444

4545
// This class controls the lifetime of a refcounted object
46-
class RefCountersImpl final : public IReferenceCounters
46+
class RefCountersImpl : public IReferenceCounters
4747
{
4848
public:
4949
inline virtual ReferenceCounterValueType AddStrongRef() override final
@@ -448,12 +448,12 @@ class RefCountersImpl final : public IReferenceCounters
448448
}
449449
}
450450

451-
void SelfDestroy()
451+
virtual void SelfDestroy()
452452
{
453453
delete this;
454454
}
455455

456-
~RefCountersImpl()
456+
virtual ~RefCountersImpl()
457457
{
458458
VERIFY(m_NumStrongReferences.load() == 0 && m_NumWeakReferences.load() == 0,
459459
"There exist outstanding references to the object being destroyed");

0 commit comments

Comments
 (0)