title: doctrine 2.1: memory usage increased after flush
body: <p>it is really unintuitive to me why after flush() the memory get increased instead of decreased? I cannot find anything useful in the documentation. I am flushing every 50 loop iterations and after each flush memory usage is being increased by 1MB. 100 flushing uses 100MB ! What am I missing here? I have seen on doctrine's website example with clear(), but it  if I use it I got an exception that one of my object does not have cascade persist set. Could anyone explain me what is done behind the scenes and what should I do to properly unset all doctrine's objects?</p>