Skip to content

Core: implement self-clearing lifecycle for configs, contexts and processors #58

Description

@N0153128

release() and close() are defined on all plugin configs and contexts but are never called anywhere — MediaApp and PluginRegistry have no lifecycle cleanup at all. Additionally, close() is an empty placeholder in all four
contexts. ImageContext.release() clears the storage map but does not call .release() on the OpenCV Mat objects held inside, leaking native memory.

Acceptance Criteria:

  • MediaApp must call release() on each plugin's config and context after fileDisarm() completes for a given file
  • close() must be implemented in all four contexts — at minimum it should delegate to release()
  • ImageContext.release() must call .release() on all Mat objects it holds before clearing the storage map
  • Verify no Mat objects remain allocated after processing completes (check with OpenCV native counter or logging)
  • Consider whether PluginRegistry should participate in lifecycle cleanup or whether MediaApp alone is sufficient

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions