No description
Find a file
qwreey 95fdfc4b12
decide(slot): break the kSlotMap/slotOwner mutual strong-reference cycle
Two separate Relates strongly holding each other's key as their value
(inst->slot in one, slot->inst in the other) is a mutual-reachability
cycle that ordinary weak-key GC can't resolve on its own -- the case
Lua 5.2 ephemerons exist for. Weaken both to pure lookups and make
bindLifetime/unbindLifetime (already used for Slot's own observers)
the single GC anchor for the slot object itself, which attachSlot/
destroySlotTree were missing.

Audited every other Relate() in base/ for the same shape (an object
other than inst used as the outer key) -- slotOwner was the only one;
everything else either has no back-reference to inst or is the safe
single-table self-reference shape bindLifetime already relies on.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 16:37:40 +09:00
.claude decide(slot): break the kSlotMap/slotOwner mutual strong-reference cycle 2026-08-12 16:37:40 +09:00
.gitignore quad-v2 재작성 계획 초기 스캐폴드 2026-08-04 00:07:40 +09:00
CLAUDE.md decide(slot): break the kSlotMap/slotOwner mutual strong-reference cycle 2026-08-12 16:37:40 +09:00
HUMAN_TODO.md quad-v2 재작성 계획 초기 스캐폴드 2026-08-04 00:07:40 +09:00
ROADMAP.md decide(attribute): group Attribute(...) primitive, AttributeKey rename, weak-cache identity 2026-08-11 18:22:54 +09:00
SAFETY.md quad-v2 재작성 계획 초기 스캐폴드 2026-08-04 00:07:40 +09:00