[TYPO3-core] RFC: t3lib_BEfunc::getRecord() does not free recordset

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Apr 18 15:48:54 CEST 2007

Dmitry Dulepov wrote: on 18.04.2007 15:41:

> Ernesto Baschny [cron IT] wrote:
>> I find it is a good practice to free recordsets when you are not using
>> them anymore, but I don't think this will cause any "memory leak", even
>> with persistent mysql connections. As far as I know all recordsets are
>> cleared automatically by PHP as soon as the script ends. At least with
>> MySQL. See http://www.php.net/mysql_free_result
> This is what manual says. As far as I know, object is bound to
> connection and really removed when connection is closed. In case of
> persistent connections, they (connections) are not removed and
> associated objects stay in memory too. Indirectly this is confirmed by
> constant Apache memory increase if persistent connections are enabled
> even if number of connections does not change. I tested it with PHP4,
> may be something changed since that time. But I feel it is better to do
> clean up. Who knows how it really works.

True! I also saw some user-comment about that in that same manual page
of PHP. So I agree to "clean that up" whenever one its on that in core
code. So keep up the good work!!


More information about the TYPO3-team-core mailing list