diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-25 16:11:44 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-25 16:11:44 +0000 |
| commit | 865f694a54a5d96a3a0c2e8211b24d5c3fb361af (patch) | |
| tree | ad2d047d226ba5497b199acc1e59d79d656f9c4b /Graphics/GraphicsEngine | |
| parent | Improved performance of DeviceObjectBase::Release() (diff) | |
| download | DiligentCore-865f694a54a5d96a3a0c2e8211b24d5c3fb361af.tar.gz DiligentCore-865f694a54a5d96a3a0c2e8211b24d5c3fb361af.zip | |
Couple cosmetic improvements
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/include/DeviceObjectBase.h | 17 |
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 ) |
