public class Cleanups
extends java.lang.Object
cleanup()
.
Thus you can register an implementation of Cleanups.Cleanup
to release the resources.
Notice that this utility is introduced mainly to resolve the memory lead issue if an application is hot re-deployed. A typical example is to stop any pooled threads.
First, register the cleanup with add(org.zkoss.util.Cleanups.Cleanup)
.
Second, invoke cleanup()
when necessary, such as when the application
is stopping
Modifier and Type | Class and Description |
---|---|
static interface |
Cleanups.Cleanup
The interface to implement for each cleanup.
|
Constructor and Description |
---|
Cleanups() |
Modifier and Type | Method and Description |
---|---|
static boolean |
add(Cleanups.Cleanup cleanup)
Registers a cleanup.
|
static void |
cleanup()
Invokes all cleanups registered with
add(org.zkoss.util.Cleanups.Cleanup) . |
static boolean |
remove(Cleanups.Cleanup cleanup)
Un-registers a cleanup.
|
public static boolean add(Cleanups.Cleanup cleanup)
public static boolean remove(Cleanups.Cleanup cleanup)
public static void cleanup()
add(org.zkoss.util.Cleanups.Cleanup)
.Copyright © 2005-2021 Potix Corporation. All Rights Reserved.