Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Free ringbuf buffer by relying on gc, not gc_free() #6238

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

Merged
merged 2 commits into from
Apr 5, 2022

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Apr 5, 2022

Fixes #6213 by not calling gc_free() on the ringbuf buffer, since ringbuf_free() may be called after the VM has stopped running. Instead, just rely on gc to free the buffer, if the VM is running.

Removes the heap struct field, since it's no longer needed.

This is not related to #6237, even though it seemed that way for a while.

@dhalbert dhalbert requested a review from jepler April 5, 2022 00:37
@dhalbert dhalbert added this to the 7.2.x milestone Apr 5, 2022
Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

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

Thanks! If this tests out OK it seems like the simplest and therefore relatively safe fix.

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