Do you have a metric scale handy?
Kidding.
The only thing I can think of is to profile the browser process and load a
simple page with a single link on it. Let the memory for the browser
stabilize for a moment (flatline) and note that usage. Then click your link
and have it create, say, 10,000 of those objects. Take the difference in
memory and then divide by 10K...
Aaron
On Mon, Oct 13, 2008 at 5:15 PM, Brandon-2 <
[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> wrote:
>
> Hey everyone,
>
> Is there any way to find out the size of an object in JavaScript? Say
> I create an object like so:
>
> Test = {
> variable : '',
> init : function() {},
> doSomething : function() {}
> }
>
> var a = new Test();
>
> Is there anything I could do to get the size of "a" in kilobytes?
>
> Thanks.
>
>
> ------------------------------
> View message @
> http://n2.nabble.com/Function-to-check-object-size-in-memory-tp1330971p1330971.html
> To start a new topic under MooTools Users, email
> [EMAIL PROTECTED]<[EMAIL PROTECTED]>
> To unsubscribe from MooTools Users, click here< (link removed) >.
>
>
>
-----
The MooTools Tutorial: http://www.mootorial.com www.mootorial.com
CNET Clientside: http://clientside.cnet.com clientside.cnet.com
--
View this message in context:
http://n2.nabble.com/Function-to-check-object-size-in-memory-tp1330971p1330981.html
Sent from the MooTools Users mailing list archive at Nabble.com.