Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object object - size

 
Arya Devan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all .. i have a small doubt... if i were to declare something like ..
var x = new Object() and i put something in the variable x . how am i supposed to find the size of this object x ??
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by size? Do you mean a list of all of its properties. An object is not like an array where you can just reference a length.

Eric
 
Arya Devan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes .... i want the list of all its properties. how should i find it ?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to look into the for(x in y) loop

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic