鸿蒙OS开发文档 鸿蒙OS overview

2024-02-25 开发教程 鸿蒙OS开发文档 匿名 4

Provides classes that leverage Java's annotation mechanism to annotate desired variables and types, so as to eliminate circular reference and improve performance.

The related classes are as follows: Permanent, Unowned, UnownedLocal, UnownedOuter, and Weak.

Since:

1

annotation types summary

Annotation TypeDescription
PermanentAnnotates persistent memory objects.
UnownedAnnotates an object without ownership to eliminate circular reference.
UnownedLocalAnnotates a method or a single local variable.
UnownedOuterAnnotates a class to eliminate circular reference.
WeakAnnotates weak reference objects.