From 962a9fa9812eacd25dd96ce6bf3c0f7cdce4df1c Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 24 Oct 2019 16:21:47 +0200 Subject: lua: actually unobserve properties in mp.unobserve_property() Not doing this looked like a memory leak. This looks like an oversight in the commit that added it: a94020e25bc5f, possible brain damage? Fixes: #6823 --- player/lua/defaults.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index 523b649b8c..7cf06426ff 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -355,6 +355,7 @@ function mp.unobserve_property(cb) for prop_id, prop_cb in pairs(properties) do if cb == prop_cb then properties[prop_id] = nil + mp.raw_unobserve_property(prop_id) end end end -- cgit v1.2.3