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

Fix memory leak in Context #1076

merged 1 commit into from Jan 28, 2017

Fix memory leak in Context #1076

merged 1 commit into from Jan 28, 2017


Copy link

@ddfreyne ddfreyne commented Jan 28, 2017

Metaclasses in Ruby do not appear to be garbage-collected, which means that all Nanoc::Int::Context instances indefinitely held on, via the metaclass, to the hash passed to them.

This replaces the define_method approach with a method_missing one, which fixes the memory leak.

@ddfreyne ddfreyne added this to the 4.6.1 milestone Jan 28, 2017
@ddfreyne ddfreyne force-pushed the fix-context-mem-leak branch from 71d67d0 to fb61c05 Jan 28, 2017
@ddfreyne ddfreyne merged commit 9de4cab into master Jan 28, 2017
1 check was pending
@ddfreyne ddfreyne deleted the fix-context-mem-leak branch Jan 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant