How much memory to hold a pointer?

S

Scott M.

How much memory is used to hold an object *reference* on the stack (not how
much memory is required for the object on the heap)?

Is it a standard size for all object references since it's really just a
pointer to a memory address?

-Scott
 
P

PvdG42

Scott M. said:
How much memory is used to hold an object *reference* on the stack (not
how much memory is required for the object on the heap)?

Is it a standard size for all object references since it's really just a
pointer to a memory address?

-Scott

Typically four bytes to hold an address.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top