There is a mechanism in Java which allows running a certain code on object destruction. Something in a way like a C++ destructor method. However, due to java memory design and implementation of garbage collection in different JVMs, you should never rely on it. You are not guaranteed when the “destructor” method will be called, […]
Read moreTag Archives: jvm
Java invokedynamic
Invokedynamic is a JVM bytecode instruction for invoking methods, which facilitates runtime type checking. Before invokedynamic was introduced in Java 1.7, we had 4 opcodes for calling methods: invokevirtual – used for public and protected instance methods invokestatic – used for static methods invokeinterface – used for methods call through an interface invokespecial – used […]
Read more