Don't cache JRuby runtime in static fields
Open
@headius is already working on this.
Since Nov 21, 2024.
jruby
- Dominant language
- Ruby
- Stars
- 782
- Forks
- 383
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 10
Description
There are a few places where we cache the JRuby runtime or runtime-specific objects in a static field, such as here with a WeakReference:
The runtimes cached in weak references will not "leak" but it may take longer for the runtime to be collected than normal. In addition, the cost of traversing the weak reference may offset any gains from caching runtime objects.
These should be removed and cached in a runtime-safe way.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.