浅析鸿蒙基础之Permanent 持久性内存对象(HarmonyOS鸿蒙开发基础知识)
HarmonyOS是一款“面向未来”、面向全场景(移动办公、运动健康、社交通信、媒体娱乐等)的分布式操作系统。在传统的单设备系统能力的基础上,HarmonyOS提出了基于同一套系统能力、适配多种终端形态的分布式理念,能够支持多种终端设备。
Permanent持久性内存对象
注释持久性内存对象。
您可以使用此类在新语句中将一个对象注释为持久性内存对象,这样该对象将不会被Ark编译器的RC回收。
参考代码
以“Integer.java”文件中的“Integercache”为例:
privatestaticclassIntegerCache{ staticfinalintlow=-128; staticfinalinthigh; staticfinalIntegercache[]; static{ ...; for(intk=0;k总结
到此这篇关于浅析鸿蒙基础之Permanent持久性内存对象(HarmonyOS鸿蒙开发基础知识)的文章就介绍到这了,更多相关鸿蒙Permanent持久性内存对象内容请搜索毛票票以前的文章或继续浏览下面的相关文章希望大家以后多多支持毛票票!
声明:本文内容来源于网络,版权归原作者所有,内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:czq8825#qq.com(发邮件时,请将#更换为@)进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。