Memory usage for a specific list of object

后端 未结 4 1904
别跟我提以往
别跟我提以往 2021-01-03 05:28

i have a list of simples pojos (a User class) with about 15 simple fields & 1 arrayList. Those represent users & maybe 100 or 1000 of them will be store in memory in

4条回答
  •  感情败类
    2021-01-03 06:02

    You can write them to ByteOutputStream, then get byte array and check its length. This will work if your pojos are Serializable.

提交回复
热议问题