rdf4j icon indicating copy to clipboard operation
rdf4j copied to clipboard

GH-3539 use a cleaner and shutdown hook instead of finalize()

Open JervenBolleman opened this issue 3 years ago • 3 comments

GitHub issue resolved: #3539

Briefly describe the changes proposed in this PR:

Use a Cleaner and shutdown hook to make sure unused resources are removed cleanly and efficiently without spooky behaviour.


PR Author Checklist (see the contributor guidelines for more details):

  • [x] my pull request is self-contained
  • [ ] I've added tests for the changes I made
  • [x] I've applied code formatting (you can use mvn process-resources to format from the command line)
  • [x] I've squashed my commits where necessary
  • [x] every commit message starts with the issue number (GH-xxxx) followed by a meaningful description of the change

JervenBolleman avatar Dec 21 '21 11:12 JervenBolleman

@kenwenzel please have a look at this and verify that I got the intention right.

Historically, I have been bitten by finalizers to often and I am highly suspicious of them.

JervenBolleman avatar Dec 21 '21 11:12 JervenBolleman

This implementation is buggy and does not work as intended. I register the store reference which thus never is phantom reachable. Fixed in #3542 let's merge that first and then redo this one.

JervenBolleman avatar Dec 21 '21 12:12 JervenBolleman

Marked this as stale to signal that the PR hasn't been active for a while and that we should consider closing it.

hmottestad avatar Jul 24 '22 07:07 hmottestad