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

Skip to content
Commit 96b62064 authored by Felix Oghina's avatar Felix Oghina
Browse files

[speech] implement recognizer proxy

This is a followup to ag/25166321: it turns out the active connection
keeps the SpeechRecognizer object from being GC'd, so implementing a
finalizer there does not work.

This CL adds a proxy object that will actually get GC'd when the client
no longer holds a reference to it. Finalizing this object destroys the
actual SpeechRecognizer.

The public API is untouched.

Test: use a sample app to purposefully leak a bunch of SpeechRecognizer
objects, forcing GC in between. Observe a single session being active at
a time.
Bug: 297249772

Change-Id: I4ff6474dbc27858ad03731916cef5729ba9e6c96
parent 1efd26d3
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