Re: [fw-general] zend_pdf memory

2009-02-10 Thread mbneto
Thomas, >From my personal experience when the function/method exits php marks the variable as unused so the garbage collector can remove it later. Depending on the amount of memory allocated /the speed of the loop this can take too long so you will be out of memory before the gc kicks in. On M

RE: [fw-general] zend_pdf memory

2009-02-10 Thread Thomas D.
Hello, Jason wrote: > > This will really help you? > > I thought that PHP will unset each local variable, when a function > > end... > > > > If your function is doing a lot of work and you unset variables when > > you > > don't need them anymore - okay, but to unset a variable at the end > > doesn

Re: [fw-general] zend_pdf memory

2009-02-09 Thread Jason Webster
This will really help you? I thought that PHP will unset each local variable, when a function end... If your function is doing a lot of work and you unset variables when you don't need them anymore - okay, but to unset a variable at the end doesn't make sense for me or did I miss something? It

RE: [fw-general] zend_pdf memory

2009-02-09 Thread Thomas D.
Hi, mbneto wrote: > Are you generating those pdf files in a loop? >  I've managed to reduce the memory footprint of > the application (not zend_pdf itself) by using unset > of the variables that are populated in each iteration. > > ex. > > function generate($params) > { >   $var1 = xxx >   $var2

Re: [fw-general] zend_pdf memory

2009-02-09 Thread mbneto
Hi, Are you generating those pdf files in a loop? I've managed to reduce the memory footprint of the application (not zend_pdf itself) by using unset of the variables that are populated in each iteration. ex. function generate($params) { $var1 = xxx $var2 = xxx // do whatever I ne