智能客服
你问我答,随时在线为你解决问题
|
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++);
- ...;
- }
- ...;
- }
-
Since:
1