Closed hajimehoshi closed 5 years ago
Oh, even though the finalizer is not executed, no objects are leaked. That's fine.
Ugh, as func (p *playerImpl) readLoop()
never ends on browsers, playerImpl
objects are leaked? But there is no way to handle this leak.
Note: When nothing refs an audio.Player object, the player is finalized after its playing finishes. This is achieved by runtime.SetFinalizer. However, SetFinalizer doesn't work on GopherJS.
As
runtime.SetFinalize
doesn't work on GopherJS, the current players will never be released...