clear callbacks on onRemoveFrame for Navigation

This commit is contained in:
Muki Kiboigo
2026-07-17 01:03:47 -07:00
parent b0c0b3fe3a
commit 1bea30ac4e

View File

@@ -56,7 +56,12 @@ fn asEventTarget(self: *Navigation) *EventTarget {
pub fn onRemoveFrame(self: *Navigation) void {
self._proto = undefined;
if (self._on_currententrychange) |cb| cb.release();
self._on_currententrychange = null;
for (self._entries.items) |entry| {
if (entry._on_dispose) |cb| cb.release();
entry._on_dispose = null;
entry._proto = undefined;
}
}