Is it possble to get all objects from memory?
<p>How to get all objects present in memory?</p>

<pre><code>public static void main( String[] arg ){
    MyClass object1 = new MyClass();
    BigDecimal bd = new BigDecimal();
    Object obj = new Object();
    List allObjects = getAllObjects(); // return  object1, bd, obj        
    ;
    ;
    ;  

}
</code></pre>
