IDataHandler exposes opaque_make, opaque_get and opaque_update, but there is no opaque_free/opaque_release/opaque_delete counterpart. Once a module registers a value via opaque_make, the underlying entry in GenericDataHandler's own opaque bookkeeping has no way to be removed for the lifetime of the run.
This is a real problem for any module that creates opaque values at a high, steady rate rather than a handful of times per program. The concrete case that surfaced it: pix_n_flix (source-academy/modules#824) registers two opaque image buffer handles per captured video frame (source and destination), so a multi-minute video session can create thousands of entries that are never reclaimed. The module can and does prune its own local shadow map each frame, but that only cleans up the module's side, not conductor's.
Proposed fix: add an opaque_free (or similarly named) method to IDataHandler, implemented by GenericDataHandler to delete the entry from its own map, and have modules call it once a given opaque handle is no longer needed.
tie/untie exist for lifetime coupling between values but don't provide actual deletion, so they don't help here.
IDataHandler exposes opaque_make, opaque_get and opaque_update, but there is no opaque_free/opaque_release/opaque_delete counterpart. Once a module registers a value via opaque_make, the underlying entry in GenericDataHandler's own opaque bookkeeping has no way to be removed for the lifetime of the run.
This is a real problem for any module that creates opaque values at a high, steady rate rather than a handful of times per program. The concrete case that surfaced it: pix_n_flix (source-academy/modules#824) registers two opaque image buffer handles per captured video frame (source and destination), so a multi-minute video session can create thousands of entries that are never reclaimed. The module can and does prune its own local shadow map each frame, but that only cleans up the module's side, not conductor's.
Proposed fix: add an opaque_free (or similarly named) method to IDataHandler, implemented by GenericDataHandler to delete the entry from its own map, and have modules call it once a given opaque handle is no longer needed.
tie/untie exist for lifetime coupling between values but don't provide actual deletion, so they don't help here.