Skip to content

clear resolved things in global context after render#227

Merged
boulter merged 2 commits into
masterfrom
clear-resolved-in-global-context
Aug 22, 2018
Merged

clear resolved things in global context after render#227
boulter merged 2 commits into
masterfrom
clear-resolved-in-global-context

Conversation

@boulter

@boulter boulter commented Aug 22, 2018

Copy link
Copy Markdown
Contributor

When calling Jinjava.renderForResult, resolved variables, functions and expressions were added all the way up to the global context, but were never cleared. This created a memory leak where resolved expressions kept accumulating in these maps.

Clear these transient values after each render.

@boulter boulter requested review from hs-lsong and mattcoley August 22, 2018 21:04

@mattcoley mattcoley left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-io

codecov-io commented Aug 22, 2018

Copy link
Copy Markdown

Codecov Report

Merging #227 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #227      +/-   ##
============================================
+ Coverage     71.42%   71.45%   +0.03%     
- Complexity     1374     1375       +1     
============================================
  Files           218      218              
  Lines          4343     4348       +5     
  Branches        689      689              
============================================
+ Hits           3102     3107       +5     
  Misses         1000     1000              
  Partials        241      241
Impacted Files Coverage Δ Complexity Δ
...in/java/com/hubspot/jinjava/interpret/Context.java 77.9% <100%> (+0.52%) 78 <1> (+1) ⬆️
src/main/java/com/hubspot/jinjava/Jinjava.java 97.67% <100%> (+0.05%) 16 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9eb073a...40fa0bb. Read the comment docs.

@boulter boulter merged commit e0b1016 into master Aug 22, 2018
@boulter boulter deleted the clear-resolved-in-global-context branch August 22, 2018 21:46
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

Successfully merging this pull request may close these issues.

4 participants