Skip to content

Conversation

@christian-byrne
Copy link
Contributor

SubgraphNode registered event listeners on parent Subgraph but never cleaned them up, causing removed nodes to accumulate in memory. Used AbortController pattern for proper lifecycle management.

Fixes #1124

… on removal

SubgraphNode was registering 6 event listeners on the parent Subgraph but never removing them when the node was deleted. This caused removed nodes to stay in memory and continue responding to events.

Added AbortController to manage all event listeners lifecycle - single abort() call in onRemoved() now properly cleans up all listeners.

Fixes #1124
@christian-byrne christian-byrne merged commit defaef8 into master Jul 22, 2025
4 checks passed
@christian-byrne christian-byrne deleted the fix/subgraph-event-listener-memory-leak branch July 22, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Critical Memory Leak: SubgraphNode event listeners never cleaned up on removal

2 participants