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
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
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
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
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