Description
Handler::$handlerWeakRefs is declared but never populated. This is either dead code or an incomplete feature.
Current State
// In Handler.php
private static array $handlerWeakRefs = [];
// Referenced in cleanupMemory() but never populated:
self::$handlerWeakRefs = array_filter(self::$handlerWeakRefs, function($weakRef) {
return $weakRef->get() !== null;
});
Implementation Details
Option A: Remove dead code
- Remove
$handlerWeakRefs property
- Remove related cleanup code in
cleanupMemory()
- Update
getMemoryStats() to not report it
Option B: Implement properly
- Populate WeakReferences when handlers are registered
- Use for tracking handler lifecycle without preventing GC
Acceptance Criteria
Description
Handler::$handlerWeakRefsis declared but never populated. This is either dead code or an incomplete feature.Current State
Implementation Details
Option A: Remove dead code
$handlerWeakRefspropertycleanupMemory()getMemoryStats()to not report itOption B: Implement properly
Acceptance Criteria