In Java bindings, delete more local references#589
In Java bindings, delete more local references#589jtraglia wants to merge 1 commit intoethereum:mainfrom
Conversation
|
Changes look sensible, but a bit hard to review due to the error cases that need to be handled. What do you think about trying out a goto-based free strategy, like we do in the core library code? Also, have we tested that these changes fix the memleaks? Should we get a Teku devs to do some testing? |
|
I spent some time on this and I don't think those changes matter than much. We are not facing a memory leak issue here. the relevant reading is this: https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/design.html#wp1242 I don't think we fall into the situation in which is better to manually call As per doc: |
Teku shared with me that their memory usage with ckzg is higher than expected (~10gb). I believe the issue is that we were not properly deleting local references.