Commit 5e48302
committed
runtime: fix memory leak on release objects
When a java object is finally freed in Java, we notify the JS side to free the JS counterpart. At this time, the Java object is held weakly in Java too using a WeakReference. While the Java object is weakly held, the WeakReference is strongly kept in a HashMap never getting removed. In this PR we release the WeakReferences too on GC event ensuring that all memory is reclaimed.1 parent 22fd3b1 commit 5e48302
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
767 | 770 | | |
768 | 771 | | |
769 | 772 | | |
| |||
0 commit comments