On Sep 5, 12:56 am, Dianne  van Dulken <[EMAIL PROTECTED]> wrote:
> And continuing on on my own thing.....
>
> I've now put some code in the core cake information, within libs\model
> \datasources\dbo\dbo_mysql.php
>
>         function _execute($sql) {
>          mysql_free_result();  // just to make sure it is freed.
>                 echo "Before executing (in bytes): ",
>      memory_get_usage(), "\n<br>";
>                 $result = mysql_query($sql, $this->connection);
>                 echo "After executing (in bytes): ",
>      memory_get_usage(), "\n<br>";
>          mysql_free_result();
>                 echo "After freeing result (in bytes): ",
>      memory_get_usage(), "\n<br>";
>          return $result;
>
>         }
>
> The results I am getting look like this:
>
> Before executing (in bytes): 4725800
> After executing (in bytes): 4725800
> After freeing result (in bytes): 4725800
> Before executing (in bytes): 4752328
> After executing (in bytes): 4752328
> After freeing result (in bytes): 4752328
> Before executing (in bytes): 4820936
> After executing (in bytes): 4820936
> After freeing result (in bytes): 4820936
> Before executing (in bytes): 4845128
> After executing (in bytes): 4845128
> After freeing result (in bytes): 4845128
> Before executing (in bytes): 5461720
> After executing (in bytes): 5461720
> After freeing result (in bytes): 5461720
> Before executing (in bytes): 5566168
> After executing (in bytes): 5566168
> After freeing result (in bytes): 5566168
> Before executing (in bytes): 5604848
> After executing (in bytes): 5604848
> After freeing result (in bytes): 5604848
>
> So absolutely no difference in freeing result.  Definitely a memory
> leak, isn't that?   (going 
> fromhttp://www.ibm.com/developerworks/opensource/library/os-php-v521/)
>
> Has anyone else experienced this, and if so, how did they fix it?
>
> Thanks yet again
>
> Di

If there is a memory leak here, it doesn't seem to be related to
cake.  As all your measurements are around the mysql_* functions.  It
is important to keep in mind that Cake caches queries and their
results, which will consume memory. If you've disabled / emptied the
query log and query cache before and after each iteration and still
find a 'leak' then we can talk.

-Mark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to