memory leak in Zend_Db_Table_Row?

Posted by Vincenzo on Stack Overflow See other posts from Stack Overflow or by Vincenzo
Published on 2010-05-31T08:28:34Z Indexed on 2010/05/31 8:32 UTC
Read the original article Hit count: 122

Filed under:
|

This is the code I have:

<?php
$start = memory_get_usage();
$table = new Zend_Db_Table('user');
for ($i = 0; $i < 5; $i++) {
  $row = $table->createRow();
  $row->name = 'Test ' . $i;
  $row->save();
  unset($row);
  echo (memory_get_usage() - $start) . "\n";
}

This is what I see:

90664
93384
96056
98728
101400

Isn't it a memory leak? When I have 500 objects to insert into DB in one script I'm getting memory overflow. Can anyone help?

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework