how to get all objects of a given type in javascript
<p>I want to retrieve all objects (not DOM elements) of a given type created with the "new" keyword.</p>

<p>Is it possible ?</p>

<pre><code>function foo(name)
{
  this.name = name;
}

var obj = new foo();
</code></pre>

<p>How can I retrieve a reference to all the foo objects ?</p>
