void FSlate3DRenderer::Cleanup() { if ( RenderTargetPolicy.IsValid() ) { RenderTargetPolicy->ReleaseResources(); } BeginCleanup(this); }
void FShaderResource::Release() { check(NumRefs != 0); if(--NumRefs == 0) { ShaderResourceIdMap.Remove(GetId()); // Send a release message to the rendering thread when the shader loses its last reference. BeginReleaseResource(this); BeginCleanup(this); } }
void FShader::Release() { check(NumRefs != 0); if(--NumRefs == 0) { DEC_DWORD_STAT_BY(STAT_Shaders_ShaderMemory, GetSizeBytes()); DEC_DWORD_STAT_BY(STAT_Shaders_NumShadersLoaded,1); // Deregister the shader now to eliminate references to it by the type's ShaderIdMap Deregister(); BeginCleanup(this); } }
void FSceneViewState::Destroy() { if ( IsInGameThread() ) { // Release the occlusion query data. BeginReleaseResource(this); // Defer deletion of the view state until the rendering thread is done with it. BeginCleanup(this); } else { ReleaseResource(); FinishCleanup(); } }
void FShaderResource::Release() { // We need to lock the resource map so that no resource gets acquired by // FindShaderResourceById while we (potentially) remove this resource FScopeLock ShaderResourceIdMapLock(&ShaderResourceIdMapCritical); check(NumRefs != 0); if(--NumRefs == 0) { ShaderResourceIdMap.Remove(GetId()); // Send a release message to the rendering thread when the shader loses its last reference. BeginReleaseResource(this); Canary = FShader::ShaderMagic_CleaningUp; BeginCleanup(this); } }
void FShader::Release() { // Lock the shader id map. Note that we don't necessarily have to deregister at this point but // the shader id map has to be locked while we remove references to this shader so that nothing // can find the shader in the map after we remove the final reference but before we deregister the shader LockShaderIdMap(); if(--NumRefs == 0) { DEC_DWORD_STAT_BY(STAT_Shaders_ShaderMemory, GetSizeBytes()); DEC_DWORD_STAT_BY(STAT_Shaders_NumShadersLoaded,1); // Deregister the shader now to eliminate references to it by the type's ShaderIdMap Deregister(); Canary = ShaderMagic_CleaningUp; BeginCleanup(this); } UnlockShaderIdMap(); }
void FShadowMap::Cleanup() { BeginCleanup(this); }