Package org.jedit.util
Class CleanerService
- java.lang.Object
-
- org.jedit.util.CleanerService
-
public class CleanerService extends java.lang.Object
The CleanerService aim to replace the use of finalize() method which is deprecated since java 9 Of course you could instantiate your own, but it will create a thread, this class aim to prevent creating threads everytime
-
-
Field Summary
Fields Modifier and Type Field Description static CleanerService
instance
-
Constructor Summary
Constructors Constructor Description CleanerService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
register(java.lang.Object object, java.lang.Runnable runnable)
Register a runnable that will be executed when the object is being garbage collected
-
-
-
Field Detail
-
instance
public static final CleanerService instance
-
-