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
merged 1 commit into from
Jan 28, 2017
Merged

Fix memory leak in Context #1076

merged 1 commit into from
Jan 28, 2017

Conversation

denisdefreyne
Copy link
Member

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.

@denisdefreyne denisdefreyne added this to the 4.6.1 milestone Jan 28, 2017
@denisdefreyne denisdefreyne merged commit 9de4cab into master Jan 28, 2017
@denisdefreyne denisdefreyne deleted the fix-context-mem-leak branch January 28, 2017 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant