Skip to content

circular-buffer / fixed-deque retain memory on shift / pop #235

Open
@TjlHope

Description

@TjlHope

We've been trying to use CircularBuffer as the basis of a weighted circular buffer, using shift / pop to bring the total size back down if increased beyond a threshold by push / unshift, however we noticed the memory of items in the buffer is still retained after the shift / pop.

This seems to be because the fixed-deque impl of those methods is just shifting the pointers and returning the element, and never deleteing the index in the array, preventing the items from being GC'd

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions