@Retention(CLASS) @Target(TYPE_USE) public @interface Permanent
You can use this class to annotate an object in the new statement as a persistent memory object, so that the object will not be recycled by the RC of the Ark compiler.
Take "Integer cache" from "Integer.java" file as an example:
private static class IntegerCache {
static final int low = -128;
static final int high;
static final Integer cache[];
static {
...;
for(int k = 0; k < cache.length; k++)
cache[k] = new @Permanent Integer(j++);
...;
}
...;
}