'Retained Size in Chrome devTools memory tab
I have attached three different variables to window Object. But why devTools show same retained size for them?
let a = 23;
let b = {
'a': 1,
'b': 2,
'c': 3
};
let c = () => {
console.log('I am a simple function')
};
Window.myNnum = a;
Window.myObj = b;
Window.myFunc = c;
Result: They all have 20 Bytes in Retained-Size and Shallow-Size, as below picture:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

