mirror of
https://github.com/mpv-player/mpv
synced 2025-04-08 18:53:30 +00:00
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
|
for prop_id, prop_cb in pairs(properties) do
|
||||||
if cb == prop_cb then
|
if cb == prop_cb then
|
||||||
properties[prop_id] = nil
|
properties[prop_id] = nil
|
||||||
|
mp.raw_unobserve_property(prop_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user