Re: PHP binding problems (Was: [midgard-dev] Midgard and Ruby/Scriptor)
Tarjei Huse <tarjei-y/[email protected]> Thu, 02 Mar 2006 13:25:51 +0100
| Newsgroups | gmane.comp.web.midgard.devel |
|---|---|
| Message-ID | <[email protected]> |
On tor, 2006-03-02 at 13:13 +0100, Piotras wrote: > "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 '??????' Add it to the php testharness and run it on devel-xen. Tarjei > > 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 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe-b5ZhpPVuLA+tlBvVaVFjCkB+6BGkLq7r@public.gmane.org > For additional commands, e-mail: [email protected] > -- Tarjei Huse <tarjei-y/[email protected]>