We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 298bce1 commit 6a69e30Copy full SHA for 6a69e30
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP01/ap01t001.java
@@ -32,6 +32,8 @@
32
public class ap01t001 extends DebugeeClass implements Cloneable {
33
/* number of interations to provoke garbage collecting */
34
final static int GC_TRYS = 4;
35
+ // Prevent test run instance from being freed too early
36
+ static ap01t001 keepAlive;
37
38
public static void main(String[] argv) {
39
argv = nsk.share.jvmti.JVMTITest.commonInit(argv);
@@ -41,7 +43,7 @@ public static void main(String[] argv) {
41
43
}
42
44
45
public static int run(String argv[], PrintStream out) {
- return new ap01t001().runThis(argv, out);
46
+ return (keepAlive = new ap01t001()).runThis(argv, out);
47
48
/*
49
private native void setTag();
0 commit comments