Skip to content
This repository was archived by the owner on Mar 2, 2021. It is now read-only.

Commit 80c4d59

Browse files
committed
Add a comment about unsafe operation
1 parent 2cab2b9 commit 80c4d59

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/vdom.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,10 @@ impl VdomInnerExclusive {
332332

333333
'outer1: for new_l in new {
334334
unsafe {
335+
// Safety relies on removing `new_l` from the registry manually
336+
// at the end of its lifetime. This happens when we invoke
337+
// `clear_active_listeners` at the start of a new rendering
338+
// phase.
335339
registry.add(new_l);
336340
}
337341
for old_l in old {

0 commit comments

Comments
 (0)