php/symfony/doctrine memory leak?

后端 未结 9 1782
旧时难觅i
旧时难觅i 2020-11-30 00:34

I\'m having problems with a batch insertion of objects into a database using symfony 1.4 and doctrine 1.2.

My model has a certain kind of object called \"Sector\", e

9条回答
  •  佛祖请我去吃肉
    2020-11-30 01:40

    For me , I've just initialized the task like that:

    // initialize the database connection
    $databaseManager = new sfDatabaseManager($this->configuration);
    $connection = $databaseManager->getDatabase($options['connection'])->getConnection();
    $config = ProjectConfiguration::getApplicationConfiguration('frontend', 'prod', true);
    sfContext::createInstance($config);
    

    (WITH PROD CONFIG)
    and use free() after a save() on doctrine's object

    the memory is stable at 25Mo

    memory_get_usage=26.884071350098Mo
    

    with php 5.3 on debian squeeze

提交回复
热议问题