mirror of https://github.com/mpv-player/mpv
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: a94020e25b
,
possible brain damage?
Fixes: #6823
This commit is contained in:
parent
bc2058fcd4
commit
962a9fa981
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue