Not doing this looked like a memory leak. This looks like an oversight in the commit that added it: a94020e25bc5f, possible brain damage?
Unified · Split
| @@ -355,6 +355,7 @@ function mp.unobserve_property(cb) · 354 unmodified lines | |||
| 355 | for prop_id, prop_cb in pairs(properties) do | 355 | for prop_id, prop_cb in pairs(properties) do |
| 356 | if cb == prop_cb then | 356 | if cb == prop_cb then |
| 357 | properties[prop_id] = nil | 357 | properties[prop_id] = nil |
| 358 | mp.raw_unobserve_property(prop_id) | ||
| 358 | end | 359 | end |
| 359 | end | 360 | end |
| 360 | end | 361 | end |