OpenHFT / OpenHFT/Java-Runtime-Compiler

Class unloading issue

Open
#136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
708
Forks
147
PR merge metrics
No merged PRs in 30d

Description

Even though the compiler is using WeakHashMap, class unloading does not work due to the circular dependency between the key - class loader and the value - the class.

PR #135 addresses the issue by wrapping the class with WeakReference. I have also added a test that triggers class unloading to prove wrapping the class was enough to make the GC reclaim it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PR #135 and the class-unloading test mentioned in the issue. Confirm that the test demonstrates class unloading and that the compiler’s class-related references no longer prevent the class from being reclaimed by the GC.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.