History

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?

wm4 committed 7 years ago

Commit 962a9fa1 parent bc2058f1 file · +1 −0Browse files

Showing the changes to player/lua/defaults.lua (1 of 1 file). Show all

Unified · Split

player/lua/defaults.lua+1−0
@@ -355,6 +355,7 @@ function mp.unobserve_property(cb) · 354 unmodified lines
355 for prop_id, prop_cb in pairs(properties) do355 for prop_id, prop_cb in pairs(properties) do
356 if cb == prop_cb then356 if cb == prop_cb then
357 properties[prop_id] = nil357 properties[prop_id] = nil
358 mp.raw_unobserve_property(prop_id)
358 end359 end
359 end360 end
360end361end

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t