[mapserver-users] mapscript memory

Alan Boudreault aboudreault at mapgears.com
Wed May 20 05:35:58 PDT 2009


Hi Charlotte,

This is a known issue with PHP Mapscript. With the way the "object" are 
currently made, complex objects (that have references to other object, like 
mapObj) are not properly freed when we delete the php object. Note that the 
memory is well freed as soon as the php script ends.

Thanks,
Alan

On May 20, 2009 08:03:41 am Charlotte Declercq wrote:
> Hello,
>
> I have a problem releasing the memory of mapscript objects.
> My php script :
>
>
> echo memory_get_usage() . "<br>";
> $Directory="/applications/carmen/data/PACA3/Publication/";
> $oMap =
> @ms_newMapObj($Directory."/environnement_testsymbols_sauvegarde_racine.map"
>);
>
> echo memory_get_usage() . "<br>";
> unset($oMap);
> echo memory_get_usage() . "<br>";
>
> The results :
> 98688
> 176360
> 176600
>
> So it seems that the $oMap object hasn't been released from memory.
>
> Can anyone help on this?
>
> Thanks,

-- 
Alan Boudreault
Mapgears
http://www.mapgears.com



More information about the MapServer-users mailing list