Re: PHP binding problems (Was: [midgard-dev] Midgard and Ruby/Scriptor)
Piotras <pp-VVDi8QVAvoBWk0Htik3J/[email protected]> Thu, 2 Mar 2006 13:13:02 +0100
| Newsgroups | gmane.comp.web.midgard.devel |
|---|---|
| Message-ID | <[email protected]> |
"Jukka Zitting" <[email protected]> wrote: > > Can you make a bug report with example code and the valgrind report? I > can take a look at that. No I can not, but: <?php for ($i = 0 ; $i > 500; $i++) { $qb = new midgardquerybuilder("classname"); $qb->add_constraint("id", "=", 1); $qb->execute(); } ?> VS: <?php for ($i = 0 ; $i > 500; $i++) { $object = new midgard_classname(); $object->get_by_id(1); } Both codes uses the same core's functionality , both uses zend's hash API. The first one produces memleak which is proportional to $i. I do not have php compiled from sources here , so all I ( and valgrind ) can say is '??????' > The Zend resource handler is used extensively by things like the PHP > mysql extension, and I've seen no memory problems even though I've > used that quite a lot. I doubt you have more than 10 mysql's connection handlers ( with resource handler ) available during request. And I am sure that there are much more than 10 resource handlers for QB during request. Piotras