Skip to content

Commit 17cbb4c

Browse files
RefCountersImpl: add a few comments related to #704
1 parent 7f79a92 commit 17cbb4c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Common/interface/RefCountedObjectImpl.hpp

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

4545
// This class controls the lifetime of a refcounted object
46+
// NB: RefCountersImpl can't be final, see https://github.com/DiligentGraphics/DiligentCore/issues/704.
4647
class RefCountersImpl : public IReferenceCounters
4748
{
4849
public:
@@ -448,6 +449,8 @@ class RefCountersImpl : public IReferenceCounters
448449
}
449450
}
450451

452+
// Make the method virtual to ensure that the object is destroyed in the same module
453+
// where it was created, see https://github.com/DiligentGraphics/DiligentCore/issues/704.
451454
virtual void SelfDestroy()
452455
{
453456
delete this;

0 commit comments

Comments
 (0)