Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5303b542 authored by Lucas Gomez Jimenez's avatar Lucas Gomez Jimenez Committed by Steve Kondik
Browse files

DO NOT MERGE Fix JNI global references leak in AudioEffect

Added deletion of global references in native AudioEffect
implementation to avoid reaching maximum number of global references.

Issue can be reproduced with the following code snippet:

AudioTrack track = new AudioTrack(...);
BassBoost effect;
while(true) {
    effect = new BassBoost(0, track.getAudioSessionId());
    effect.release();
    effect = null;
}

Crash will happen after a few seconds when system runs out of
global references.

Change-Id: I3343967aae60784e61279e26151a28d01457c78b
parent af6d9b98
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment