As the question says, how much memory is used for a reference to an Object in the Java Programming Language?
Please, if you have a trusted source is better.
Thanks a lot!
It's not specified by the language or JVM spec. However, it's generally accepted that any sane implementation will be 4 bytes on a 32-bit machines and between 4 and 8 bytes (depending on compressed pointer settings, etc.) on a 64-bit machine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With