I just found the solution to two memory leaks that have been troubling me and documented them at http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PythonMapScriptMemoryLeaks I'd be happier if I'd found these before the 4.0 release, but we'll get them into 4.0.1. cheers, Sean