当您从本地存储中检索javascript对象时,它是否将整个对象加载到内存中?

时间:2021-08-12 17:48:34

when you retrieve a javascript object from local storage, does it load the entire object into memory?

当您从本地存储中检索javascript对象时,它是否将整个对象加载到内存中?

1 个解决方案

#1


0  

All Javascript data is stored in memory. So, yes reading something from LocalStorage will load it into memory.

所有Javascript数据都存储在内存中。所以,是的,从LocalStorage读取内容会将其加载到内存中。

LocalStorage stores strings so reading something from LocalStorage will be a string in Javascript memory unless/until you parse it into something else.

LocalStorage存储字符串,因此从LocalStorage读取内容将是Javascript内存中的字符串,除非/直到您将其解析为其他内容。

#1


0  

All Javascript data is stored in memory. So, yes reading something from LocalStorage will load it into memory.

所有Javascript数据都存储在内存中。所以,是的,从LocalStorage读取内容会将其加载到内存中。

LocalStorage stores strings so reading something from LocalStorage will be a string in Javascript memory unless/until you parse it into something else.

LocalStorage存储字符串,因此从LocalStorage读取内容将是Javascript内存中的字符串,除非/直到您将其解析为其他内容。