Skip to content

Add reset interpreter method#681

Merged
nickl- merged 4 commits intobeanshell:masterfrom
nickl-:reset-interpreter
Dec 26, 2022
Merged

Add reset interpreter method#681
nickl- merged 4 commits intobeanshell:masterfrom
nickl-:reset-interpreter

Conversation

@nickl-
Copy link
Member

@nickl- nickl- commented Dec 26, 2022

Interpreter allows for multiple eval calls and for this purpose certain state is kept. Added reset method to release additional resources and when completely done with interpreter. fixes #413

@codecov
Copy link

codecov bot commented Dec 26, 2022

Codecov Report

Merging #681 (a5f91ea) into master (6ae3d7a) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master     #681      +/-   ##
============================================
+ Coverage     71.35%   71.38%   +0.02%     
- Complexity     2798     2800       +2     
============================================
  Files           106      106              
  Lines          9137     9146       +9     
  Branches       1779     1779              
============================================
+ Hits           6520     6529       +9     
  Misses         2204     2204              
  Partials        413      413              
Flag Coverage Δ
unittests 71.38% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/main/java/bsh/BshClassManager.java 66.83% <100.00%> (+0.16%) ⬆️
src/main/java/bsh/Interpreter.java 77.41% <100.00%> (+0.19%) ⬆️
src/main/java/bsh/Name.java 86.76% <100.00%> (+0.16%) ⬆️
src/main/java/bsh/Reflect.java 81.45% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

To release additional resources and when completely done with interpreter. fixes beanshell#413
In BshClassManager change the synchronized collections to use concurrent instead
@nickl-
Copy link
Member Author

nickl- commented Dec 26, 2022

Fixed scrutinizer raised issue and repush

@nickl- nickl- merged commit d3f4208 into beanshell:master Dec 26, 2022
pgiffuni pushed a commit to pgiffuni/beanshell that referenced this pull request Jan 8, 2024
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.

Memory leak profiler inspection

1 participant