Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 22846 программистов и 2041 робот. Сейчас ищут 1493 программиста ...

->free()

Вернуться к: DB_DataObject

->free()

->free() – Free resources

Synopsis

object $DB_DataObject->free ( )

DataObjects stores result set's as a private global variable, normally this is free'ed after you have run through the results, or at the end of the request. However in some situations, like running queries directly, inserting data, some data is unnecessarly cached.

Using this method will Free All results sets! (so be carefull) it may break running fetch() loops..

You normally only need to use this if you are doing a large number of inserts or queries.

Note

This function can not be called statically.

Example

Freeing resources in a loop

<?php

for ($i 0i10000$i++) {
    
$person = new DataObjects_Person;
    
$person->query(' ... do something ... ');
    
$person->free();
}

?>


Вернуться к: DB_DataObject

© 2025 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware