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

Alan Boudreault aboudreault at mapgears.com
Fri Apr 29 14:08:00 EDT 2011


That's what I thought. Thanks for testing.

Alan

On April 29, 2011 01:40:42 pm Armin Burger wrote:
> Alan
> 
> I used a script creating 3 different type of objects without applying
> the "free" method, put it in a loop with 1M cycles and opened it in a
> browser. Checking the memory usage of the Apache process while running
> the script showed no increase of memory at all. So I would guess the
> free() is not needed any more. Test was made with MS 5.6
> 
> Armin
> 
> On 29/04/2011 15:13, Alan Boudreault wrote:
> > 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