• Post Reply Bookmark Topic Watch Topic
  • New Topic

object references and memory space requirements  RSS feed

 
boyet silverio
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Say lots of data from db records need to be "loaded" into objects and then these objects are "put" into a java.util.Vector object. The size of the "data" that would occupy memory space can be estimated. But howabout each of the objects' reference addresses that were put into the vector, do these also occupy memory space, or, for some reason (i don't know), are copies of these addresses made by the jvm and placed in memory space? If they are, would they grow to be significant for estimating memory requirements...big/small devices?
Thanks. I learn from any comment.
 
Jon Strayer
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
References take up four bytes (this is from memory - YMMV)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!