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

Garbage-collect obscured variables #13

Closed
julianhyde opened this issue Mar 1, 2020 · 1 comment
Closed

Garbage-collect obscured variables #13

julianhyde opened this issue Mar 1, 2020 · 1 comment

Comments

@julianhyde
Copy link
Collaborator

Each time you define a variable in the shell, it adds a new value to the environment. If it has the same name as an existing variable, the old variable is not accessible, but it is still in the environment (implemented as a linked-list) and cannot be garbage-collected by the JVM.

I suspect that there are cases, such as where you define the same variable thousands of time, which have memory leaks. We should fix those.

The linked-list environment is good in general, but we need to find a way to purge it, without paying an O(n) cost to check the whole environment every time.

@julianhyde
Copy link
Collaborator Author

Fixed in 297c3be.

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

1 participant