-
Notifications
You must be signed in to change notification settings - Fork 111
Fix process-global memory leak in folded_declaration_cache #180
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,12 +31,6 @@ class Parser | |
| # Array of CSS files that have been loaded. | ||
| attr_reader :loaded_uris | ||
|
|
||
| #-- | ||
| # Class variable? see http://www.oreillynet.com/ruby/blog/2007/01/nubygems_dont_use_class_variab_1.html | ||
| #++ | ||
| @folded_declaration_cache = {} | ||
| class << self; attr_reader :folded_declaration_cache; end | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The class-level |
||
|
|
||
| def initialize(options = {}) | ||
| @options = { | ||
| absolute_paths: false, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line was setting
@folded_declaration_cacheon theCssParsermodule object itself — completely separate from both the class-level one on Parser and the per-instance one created inreset!. Three different Ruby objects all had an ivar with the same name, but nothing ever read from this one.