[PHP] When does PHP free-up memory allocated to it?

2007-05-21 Thread Richard Davey
Hi, Quick question - does anyone know when PHP actually frees allocated memory during the process of a script? I'm using 5.2.2. For example I see the following results when profiling: Memory: 256 KB Load a 1024x768 JPEG (via GD) Memory: 4 MB Create thumbnail (via GD) Memory: 5.2 MB Destroy

Re: [PHP] When does PHP free-up memory allocated to it?

2007-05-21 Thread Richard Lynch
On Mon, May 21, 2007 4:23 am, Richard Davey wrote: Quick question - does anyone know when PHP actually frees allocated memory during the process of a script? When it can be sure that a variable is no longer needed. Specifically, when the .refcount of a zval turns to 0. I'm using 5.2.2. For

Re[2]: [PHP] When does PHP free-up memory allocated to it?

2007-05-21 Thread Richard Davey
Hi Richard, Tuesday, May 22, 2007, 1:24:35 AM, you wrote: I would have expected (or rather, hoped) that the memory use would have dropped down quite dramatically after destroying the image resource that was using up nearly 4MB of memory, but it didn't seem to change. How are you measuring