AppCache
AppCache copied to clipboard
问下为啥实体类需要序列化,为啥需要Serializable,不能用Parcelable么?
这要看 这个对象使用的场景
在 2018年8月28日,11:26,Begonia [email protected] 写道:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
能具体说一下么?
Parcelable不能使用在要将数据存储在磁盘上的情况,因为Parcelable不能很好的保证数据的持续性在外界有变化的情况下。尽管Serializable效率低点,但此时还是建议使用Serializable