[mapserver-users] free() methods in MapScript, compatibility MS 5.x and 6

Alan Boudreault aboudreault at mapgears.com
Fri Apr 29 06:13:53 PDT 2011


Hi Armin,

Although I'm not sure if the free call was useful... since it was only 
removing the php object from a global list but the object was not really freed 
until the end of the script... I would suggest to simply add a such condition 
"if ms_version < 6 ... obj->free()" rather than removing them to be compatible 
5.6/6.0 and avoid any issue. You can also do a quick test in your script with 
some echo of the memory used before the end of the script and see if the 
free() removal has any effect.

Alan

On April 27, 2011 01:25:54 pm Armin Burger wrote:
> Hi everybody
> 
> in MapServer/MapScript 6 the various class methods "free()" have been
> removed. If I want to have PHP/MapScript code compatible with both
> MapServer 5.x and 6, the easiest would be to completely remove these
> method calls from the code.
> 
> My question is just if these free() methods are still somehow required
> or recommended for MapServer/MapScript 5.x or if I can silently drop
> them without any drawbacks.
> 
> Cheers
> Armin
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

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



More information about the MapServer-users mailing list