[Perf] reduce memory usage by freeing playlist videos when playlist view is closed

This commit is contained in:
Brahim Hadriche committed 2025-10-02 09:05:12 -04:00
1 parent 0da51937f7
commit 5fcd576fc7
4 files changed
+7 -1

No files matched your search

@@ -6,6 +6,8 @@ namespace PlaylistUtils
end if
appController@.PushScreen(playlistView)
playlistView@.BindNode()
playlistView.content = contentNode
' Clone the playlist because the videos will be loaded as children.
' This allows the videos to be freed once the view is closed.
playlistView.content = contentNode.clone(false)
end function
end namespace
@@ -556,6 +556,8 @@ namespace Invidious
end if
json.type = "playlist"
' Since we only want the playlist info, we can remove the videos array
json.Delete("videos")
return {
items: [json]
}