Skip to content

fix: Memory Leak + CI - #2

Merged
gocanto merged 2 commits into
mainfrom
fix/memory-leak
Mar 31, 2026
Merged

gocanto merged 2 commits into
mainfrom
fix/memory-leak

Conversation

@gocanto

@gocanto gocanto commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds CI and status badges to the README and updates several collection methods—including Pop, Shift, and Random—to use explicit slice copies instead of simple slicing. While these changes aim to prevent memory leaks, the reviewer noted that they introduce significant performance regressions by turning O(1) operations into O(N) due to full slice reallocations. The feedback suggests maintaining performance by zeroing out removed elements and using standard slicing instead of full copies.

Comment thread collection/mutation.go Outdated
Comment thread collection/mutation.go Outdated
Comment thread collection/mutation.go Outdated
Comment thread collection/mutation.go Outdated
@gocanto
gocanto marked this pull request as ready for review March 31, 2026 08:27
@gocanto
gocanto merged commit 9d8a7cd into main Mar 31, 2026
1 check passed
@gocanto
gocanto deleted the fix/memory-leak branch March 31, 2026 08:28
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.

1 participant