摘要: binder共享内存 硬盘或者网络,,必须Serializable,序列化时会产生大量的临时变量,从而引起频繁的GC Parcelable只适用于android 跨进程调用,性能优,不能保证持续性,不能磁盘使用 SQLite和SharePreferences也是序列化 面试: 1、Android使用 阅读全文
posted @ 2020-04-06 22:31 Anny0920 阅读(141) 评论(0) 推荐(0) 编辑
摘要: //大量的反射,创建很多的临时变量,导致内存碎片,Serializable缺点 /** * 子类实现序列化,父类没有实现序列化,会报错 */ package com.anny.protobuf.serializable; import java.io.ByteArrayInputStream; im 阅读全文
posted @ 2020-04-06 21:26 Anny0920 阅读(345) 评论(0) 推荐(0) 编辑
摘要: Plugins安装Protobuf support build.gradle(application): dependencies { classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8' } build.gradle(app): 阅读全文
posted @ 2020-04-06 21:14 Anny0920 阅读(187) 评论(0) 推荐(0) 编辑