Package net.sf.colossus.util
Class InstanceTracker
java.lang.Object
net.sf.colossus.util.InstanceTracker
Objects can register here when they are created.
This class notices when it an object is garbage collected
and keeps then track which instances are still running/alive.
One can configure for which classes one is interested
in seeing the created/removed delta.
This is meant for debug/development purposes, to verify
that cleanup is usually done properly, and not threads
or objects stay unintentionally referenced and never
get garbage collected.
So while editing/testing, one sets the "which one to see"
to the ones one want to monitor, but in productive use,
i.e. when checked in to svn, this should be set to
"don't show anything".
(perhaps with Java 1.5 or 1.6, or a good debugger one can
achieve the same effect, but I don't know how ;-)
- Author:
- Clemens Katzer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static boolean
private static Map
<String, InstanceGroup> private static boolean
private static final Logger
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LOGGER
-
instanceGroups
-
interestedIn
-
interestedInAll
private static boolean interestedInAll -
ignoreDummyFrame
private static boolean ignoreDummyFrame
-
-
Constructor Details
-
InstanceTracker
public InstanceTracker()
-
-
Method Details
-
register
-
setId
-
printStatistics
public static void printStatistics() -
getPrintStatistics
-
allGone
public static boolean allGone()
-