MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ReleaseResources

Method ReleaseResources

Source/Engine/Video/Video.cpp:423–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423void VideoBackendPlayer::ReleaseResources()
424{
425 if (AudioSource)
426 {
427 AudioBackend::Source::Stop(AudioSource);
428 AudioBackend::Source::Remove(AudioSource);
429 AudioSource = 0;
430 }
431 for (uint32& bufferId : AudioBuffers)
432 {
433 if (bufferId)
434 {
435 AudioBackend::Buffer::Delete(bufferId);
436 bufferId = 0;
437 }
438 }
439 if (UploadVideoFrameTask)
440 UploadVideoFrameTask->Cancel();
441 VideoFrameMemory.Release();
442 SAFE_DELETE_GPU_RESOURCE(Frame);
443 SAFE_DELETE_GPU_RESOURCE(FrameUpload);
444#ifdef TRACY_ENABLE
445 Allocator::Free(DebugUrl);
446#endif
447}

Callers 3

Player_DestroyMethod · 0.45
Player_DestroyMethod · 0.45
Player_DestroyMethod · 0.45

Calls 6

DeleteFunction · 0.85
StopFunction · 0.50
RemoveFunction · 0.50
FreeFunction · 0.50
CancelMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected