Let's say we are asynchronously parsing a HLS playlist.
The client creates a HLSParser.
The client starts a parse with a callback.
The client does not retain a reference to the HLSParser while parsing happens.
Expected Behavior
The client should be called back.
Observed Behavior
The client is not called back.
Why? There is a weak ref between the HLSParseWorker and the HLSParser. As soon as the work starts, no one has a strong ref to HLSParser and it's deleted (along with the callback closure ref!).
I think the fix should be to have a temp strong link between the HLSParseWorker and the HLSParser which should be broken when the parse is done (to avoid a circular ref). There might be other fixes as well.
Let's say we are asynchronously parsing a HLS playlist.
The client creates a
HLSParser
.The client starts a
parse
with a callback.The client does not retain a reference to the
HLSParser
while parsing happens.Expected Behavior
The client should be called back.
Observed Behavior
The client is not called back.
Why? There is a weak ref between the
HLSParseWorker
and theHLSParser
. As soon as the work starts, no one has a strong ref toHLSParser
and it's deleted (along with the callback closure ref!).I think the fix should be to have a temp strong link between the
HLSParseWorker
and theHLSParser
which should be broken when the parse is done (to avoid a circular ref). There might be other fixes as well.Observed on device(s):
Observed on OS Version(s):