audio: Add comments about GC (#746)

This commit is contained in:
Hajime Hoshi 2018-12-18 23:07:19 +09:00
parent 241ccc307f
commit 1760070130

View File

@ -350,6 +350,11 @@ func BytesReadSeekCloser(b []byte) ReadSeekCloser {
}
// Player is an audio player which has one stream.
//
// Even when all references to a Player object is gone,
// the object is not GCed until the player finishes playing.
// This means that if a Player plays an infinite stream,
// the object is never GCed unless Close is called.
type Player struct {
p *playerImpl
}