title: ObjectPooling for Nested Objects - Best technique
body: <p>I have a nested object with many nesting layers. Each object is basically containing list of some other types. I need to create a huge number of objects of these (almost 100 K) in short duration, and then discard them and then again create new. I wanted to understand whats the best way of pooling such kind of objects. Should I pool the whole object (the list member count for different objects may be different, or should I pool the last object E, though its very small ). Any suggestions are welcome.</p>
  
  <pre><code>ClassA
  {
      int a;
      List&lt;ClassB&gt; mList;
  }
  ClassB
  {
      int b;
      List&lt;ClassC&gt; mList;
  }
  ClassC
  {
      int b;
      List&lt;ClassD&gt; mList;
  }
  ClassD
  {
      int b;
      List&lt;ClassE&gt; mList;
  }
  ClassE
  {
      int a ;
      int b;
      List&lt;int&gt; bcd;
      List&lt;string&gt; efg;
  
  }
  </code></pre>