Can you determine the memory footprint of a collection?
<p>I have an in-memory collection that I want to flush to disk once it has reached either a certain size (count wise) or memory footprint.</p>

<p>How can I determine how much memory a collection is using?</p>

<p>It is going to be some sort of Dictionary/Map.</p>
