How impossible would it be to add a delete keyword to the JVM, and why?
Eclipse OpenJ9 – Open-source JVM
21–30 of 105 posts
Re: Eclipse OpenJ9 – Open-source JVM
#22So is this OpenJDK-derived? If so, too bad, I've been hoping for a truly independent implementation. If not, does it pass the TCK?
Ex-J9 engineer here, J9 was built completely in a clean-room. It does pass the TCK tests.
Re: Eclipse OpenJ9 – Open-source JVM
#23Will a Java expert (JVM developer) please answer this question? Thank you. How impossible would it be to add a delete keyword to the JVM, and why?
Re: Eclipse OpenJ9 – Open-source JVM
#24Will a Java expert (JVM developer) please answer this question? Thank you. How impossible would it be to add a delete keyword to the JVM, and why?
A "delete now" operation imposes requirements on implementations that are not strictly required.
Any advantages gained from destructors can be realized via explicit cleanup methods and (as a hedge against mis-use) state checking for initialized and destroyed objects. A delete operation also adds risk that an object that has been deleted may be referenced again (although with esoteric stuff like PhantomReferences you can almost do it).
Re: Eclipse OpenJ9 – Open-source JVM
#25Will a Java expert (JVM developer) please answer this question? Thank you. How impossible would it be to add a delete keyword to the JVM, and why?
Why would you want to add a delete keyword? Are you trying to add explicit memory management to simplify the work of the garbage collector?
Re: Eclipse OpenJ9 – Open-source JVM
#26Will a Java expert (JVM developer) please answer this question? Thank you. How impossible would it be to add a delete keyword to the JVM, and why?
Java does memory recovery strictly by garbage collection. To delete an object remove all references to that object and wait. A "delete now" operation imposes requirements on implementations that are not strictly required. Any advantages gained from destructors can be realized via explicit cleanup methods and (as a hedge against mis-use) state checking for initialized and destroyed objects. A delete operation also add…
Re: Eclipse OpenJ9 – Open-source JVM
#27Re: Eclipse OpenJ9 – Open-source JVM
#28Wonder if it will be possible to compile under OS X. Curiously OS X binaries have never been available for J9.
Re: Eclipse OpenJ9 – Open-source JVM
#29The "Welcome to the Eclipse OpenJ9 repository" is just brilliant. So many product blogs and source code repositories fail to introduce the product first.