summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-07-25 16:11:44 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-07-25 16:11:44 +0000
commit865f694a54a5d96a3a0c2e8211b24d5c3fb361af (patch)
treead2d047d226ba5497b199acc1e59d79d656f9c4b /Graphics/GraphicsEngine
parentImproved performance of DeviceObjectBase::Release() (diff)
downloadDiligentCore-865f694a54a5d96a3a0c2e8211b24d5c3fb361af.tar.gz
DiligentCore-865f694a54a5d96a3a0c2e8211b24d5c3fb361af.zip
Couple cosmetic improvements
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/DeviceObjectBase.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/Graphics/GraphicsEngine/include/DeviceObjectBase.h b/Graphics/GraphicsEngine/include/DeviceObjectBase.h
index 3d98b426..f9a53979 100644
--- a/Graphics/GraphicsEngine/include/DeviceObjectBase.h
+++ b/Graphics/GraphicsEngine/include/DeviceObjectBase.h
@@ -91,15 +91,14 @@ public:
// m_pAllocator->Free(m_pObject) - crash!
RefCntAutoPtr<RenderDeviceImplType> pDevice;
- return ValidatedCast<RefCountersImpl>(this->GetReferenceCounters())->
- ReleaseStrongRef(
- [&]()
- {
- // We must keep the device alive while the object is being destroyed
- // Note that internal device objects do not keep strong reference to the device
- pDevice = m_spDevice;
- }
- );
+ return TBase::Release(
+ [&]()
+ {
+ // We must keep the device alive while the object is being destroyed
+ // Note that internal device objects do not keep strong reference to the device
+ pDevice = m_spDevice;
+ }
+ );
}
IMPLEMENT_QUERY_INTERFACE_IN_PLACE( IID_DeviceObject, TBase )