title: Is there a possible memory problem with lookup array in Java?
body: <p>I am experimenting with Java and MongoDB and I am making a lookup aggregation. I noticed that when I perform a lookup the document returned contains the lookup field as an Array of documents - as a <code>java.util.ArrayList</code>.
  So my question here is - what if I have a case where in my lookup array I will have many documents loaded ? This may be a problem for my java heap memory ?</p>