Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Allow to clear individual sessions #1066

Open
MiSikora opened this issue Nov 13, 2024 · 1 comment · May be fixed by #1067
Open

Allow to clear individual sessions #1066

MiSikora opened this issue Nov 13, 2024 · 1 comment · May be fixed by #1067
Assignees
Labels
all-platforms enhancement New feature or request fixed-on-development Fixed on the development branch. Not released yet. v6.0

Comments

@MiSikora
Copy link

MiSikora commented Nov 13, 2024

Is your feature request related to a problem? Please describe.

FFmpegSession holds a reference to FFmpegSessionCompleteCallback, which can contain any objects including the ones that have their own lifecycles. This can lead to memory leaks as sessions are retained in the history of FFmpegKitConfig. I'd like to be able to clear sessions individually from FFmpegKitConfig. Currently, the only option is to call FFmpegKitConfig.clearSessions(), which removes the entire history.

Describe the solution you'd like

A method like FFmpegKitConfig.clearSession(final String sessionId) that removes a specific session.

Describe alternatives you've considered

Alternatively, FFMpegSession could avoid holding a strong reference to FFmpegSessionCompleteCallback, or it could be possible to set the history size of FFmpegKitConfig to 0. Another option would be to not retain sessions but some sort of snapshots that do not have callbacks but this would be a breaking change.

Platform

Android

Additional context

N/A

@tanersener
Copy link
Collaborator

We have decided to retire the ffmpeg-kit project and will no longer publish any new releases. Additionally, all previously released ffmpeg-kit binaries will be removed soon.

The fix for this issue has been applied to the development branch. If you need it, you will need to build the fix yourself. Thank you for your understanding and support.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
all-platforms enhancement New feature or request fixed-on-development Fixed on the development branch. Not released yet. v6.0
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants