Package ptolemy.moml.test
Class MoMLParserLeak
- java.lang.Object
-
- ptolemy.moml.test.MoMLParserLeak
-
public class MoMLParserLeak extends java.lang.ObjectLeak memory in MoMLParser by throwing an Exception.Under Java 1.4, run this with:
java -Xrunhprof:depth=15 -classpath "$PTII;." ptolemy.moml.test.MoMLParserLeak
and then look in java.hprof.txt.- Since:
- Ptolemy II 5.2
- Version:
- $Id$
- Author:
- Christopher Brooks
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Field Summary
Fields Modifier and Type Field Description static MoMLParserparserNote that the parser is what actually leaks here.
-
Constructor Summary
Constructors Constructor Description MoMLParserLeak()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CompositeEntityleak()Attempt to leak code by parsing MoML that looks for a class that does not exist.static voidmain(java.lang.String[] args)Attempt to leak code by parsing MoML that looks for a class that does not exist.
-
-
-
Field Detail
-
parser
public static MoMLParser parser
Note that the parser is what actually leaks here.
-
-
Method Detail
-
leak
public static CompositeEntity leak() throws java.lang.Exception
Attempt to leak code by parsing MoML that looks for a class that does not exist.- Returns:
- the top level that would be found if the class that does not exist was present
- Throws:
java.lang.Exception- If the class does not exist.
-
main
public static void main(java.lang.String[] args) throws java.lang.ExceptionAttempt to leak code by parsing MoML that looks for a class that does not exist.- Parameters:
args- Ignored.- Throws:
java.lang.Exception- if there is a problem parsing
-
-