diff options
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 ) |
