Skip to content

Remove doubling of memory in the Clear method#96

Merged
coocood merged 1 commit intocoocood:masterfrom
Staon:master
Dec 4, 2020
Merged

Remove doubling of memory in the Clear method#96
coocood merged 1 commit intocoocood:masterfrom
Staon:master

Conversation

@Staon
Copy link
Copy Markdown
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
Copy Markdown
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