Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove doubling of memory in the Clear method #96

Merged
merged 1 commit into from
Dec 4, 2020

Conversation

Staon
Copy link
Contributor

@Staon Staon commented Dec 3, 2020

Previous implementation of the Clear method has allocated new ringbuffers.
Memory footprint of the process has been doubled so as the old memory blocks
stayed in the memory until the garbage collector cleaned them.

This change In this commit the the beahvior has been changed: just internal
pointers in the ringbuffers are reset now and the old memory blocks are reused.

Previous implementation of the Clear method has allocated new ringbuffers.
Memory footprint of the process has been doubled so as the old memory blocks
stayed in the memory until the garbage collector cleaned them.

This change In this commit the the beahvior has been changed: just internal
pointers in the ringbuffers are reset now and the old memory blocks are reused.
@coocood
Copy link
Owner

coocood commented Dec 4, 2020

Good job!
Thank you!

@coocood coocood merged commit a308261 into coocood:master Dec 4, 2020
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.

2 participants