Allow to clear individual sessions #1066
Labels
all-platforms
enhancement
New feature or request
fixed-on-development
Fixed on the development branch. Not released yet.
v6.0
Is your feature request related to a problem? Please describe.
FFmpegSession
holds a reference toFFmpegSessionCompleteCallback
, 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 ofFFmpegKitConfig
. I'd like to be able to clear sessions individually fromFFmpegKitConfig
. Currently, the only option is to callFFmpegKitConfig.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 toFFmpegSessionCompleteCallback
, or it could be possible to set the history size ofFFmpegKitConfig
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
The text was updated successfully, but these errors were encountered: