[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: After retrieving data from DB, the memory doesn't seem to be freed up


When the array goes out of scope its reference count is decremented. If the reference count goes to zero (implying there are no more references) the memory is released.

I would have believed the same, and that's why I believed that

$tmp = [0..100000];

followed by
$tmp = 1;

would free memory (no more reference to the anonymous array), but Perrin is telling me this is not the case.

Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.