developer
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rohan_Fernandes
Posted On:   Tuesday, September 2, 2003 02:35 AM

how to find the size of any object at runtime?

Re: developer

Posted By:   David_Bates  
Posted On:   Tuesday, September 2, 2003 03:25 AM

Are there three people that really want to know the answer to this question?



Sigh...



While I'm here I'll add something else...



Technically, you should be able to roughly work this out yourself by looking at the instance variables in the class since the size of primitives are specified in Java.



Another problem about saying how "big" an object is, is that what is "part" of the object? For example (in text-based UML):


ObjectA <>------------ 1 ObjectB 1 -------------<> ObjectC


You see that both ObjectA and ObjectC hold a reference to ObjectB. So when considering how "big" ObjectA is, do we include the size of ObjectB? What about when computing the size of ObjectC?
About | Sitemap | Contact