Skip to content

Commit

Permalink
fix(player): Fix another bubblezone memory leak
Browse files Browse the repository at this point in the history
When a movie finishes, the default tea.Quit message is sent.
This message does not get sent to our player,
so the bubblezone instance is kept open resulting in a memory leak.
  • Loading branch information
gabe565 committed Apr 24, 2024
1 parent 54a7bb7 commit 5d0bf46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/movie/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (p Player) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if p.log != nil {
p.log.Info("Finished movie")
}
return p, tea.Quit
return p, Quit
}
case p.frame <= 0:
p.speed = 1
Expand All @@ -112,7 +112,7 @@ func (p Player) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if p.log != nil {
p.log.Info("Finished movie")
}
return p, tea.Quit
return p, Quit
} else if p.frame+frameDiff <= 0 {
p.speed = 1
p.activeOption = 4
Expand Down

0 comments on commit 5d0bf46

Please sign in to comment.