MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ on_detach()

void MayaFlux::Buffers::FormaProcessor::on_detach ( const std::shared_ptr< Buffer > &  )
overrideprotectedvirtual

Called when this processor is detached from a buffer.

Parameters
bufferBuffer this processor is being detached from

Provides an opportunity for the processor to clean up buffer-specific state or release resources. With expanded processor capabilities, this method should also:

  • Release Hardware Resources: Clean up GPU memory, CUDA contexts, or other acceleration resources
  • Finalize Backend Operations: Ensure all pending backend operations are completed
  • Reset Processing State: Clear any buffer-specific optimization parameters or cached data
  • Restore Default Backend: Return to default processing backend if override was applied
  • Synchronize Operations: Ensure all parallel processing operations have completed

Default implementation does nothing, but proper resource management in derived classes is crucial for optimal performance and preventing resource leaks.

Reimplemented from MayaFlux::Buffers::BufferProcessor.

Definition at line 125 of file FormaProcessor.cpp.

126{
127 m_staging.reset();
128 m_slices = SliceSet(m_stride, m_topology);
129 m_default_slice = 0;
130 m_changed = false;
131 m_pending_runs.reset();
132}
Portal::Graphics::PrimitiveTopology m_topology
std::shared_ptr< VKBuffer > m_staging
std::optional< std::vector< Portal::Graphics::DrawRun > > m_pending_runs

References m_changed, m_default_slice, m_pending_runs, m_slices, m_staging, m_stride, and m_topology.