On Thu, Jun 16, 2011 at 12:51 PM, Nathan Nobbe <quickshif...@gmail.com> wrote:
> Hi gang,
> If anyone out there has some experience w/ Doctrine now would be a great
> time to share it!
> So I'm writing a batch importer and noticed memory usage climbing during
> script execution.
> In the debugging effort I've isolated it down to a Doctrine issue.
> Here's what's going on, I instantiate a model object for the product table
> from my application
> $newRecord = new Product();
> at this point memory usage goes up noticeably.  I don't really care though
> because I figure I can delete it, but look at this madness I have going
> (which *fails* to free up the memory)
> $newRecord->clearRelated();
> $newRecord->free();
> unset($newRecord);
> gc_collect_cycles();
> after all of this memory consumption is still dramatically higher than prior
> to the first call creating the object above.  This I've verified through
> memory_get_usage().
> here's the output from the memory_get_usage() calls
> int(166461440) // before new Product()
> int(169345024) // directly after new Product()
> int(169345024) // after madness trying to free memory used by new Product()
> I've also tried an explicit call to the destructor of $newRecord, but that
> results in a fatal attempting to call an unknown method.
> Any help would be greatly appreciated as google hasn't been able to point me
> to the answer thus far.
> thx,
> -nathan

This might help


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to