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

Constants *can* be GC'd #2

Closed
tenderlove opened this issue Apr 7, 2017 · 1 comment
Closed

Constants *can* be GC'd #2

tenderlove opened this issue Apr 7, 2017 · 1 comment

Comments

@tenderlove
Copy link

tenderlove commented Apr 7, 2017

If you remove a constant, the object it points to will be GC'd. But constants aren't really a type of object, it's just a name.

@benoittgt
Copy link
Owner

benoittgt commented Apr 8, 2017

Yes you're correct. I was blurred by

The most obvious way that Ruby grows in memory usage is by retaining objects. Constants in Ruby are never garbage collected so if a constant has a reference to an object, then that object can never be garbage collected. source

Readme changed with #3

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

No branches or pull requests

2 participants