{"comment":{"created_at":"2011-10-11T16:20:56Z","body":"[springmeyer] so, this should be fixed in trunk in r1507 and the 0.7 series branch in r1506.\r\n\r\nFeel free to re-open if this does not fix for you.","updated_at":"2011-10-11T16:20:56Z","url":"https://api.github.com/repos/artemp/mapnik/issues/comments/2366851","id":2366851,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"}},"action":"created","issue":{"number":473,"created_at":"2011-10-11T16:20:51Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"It looks like both load_map and load_map_from_string functions have memory leaks. I've attached the script that reproduces the problem (should run fine on any system with ps available). The script itself simply creates a new map, loads XML file and then del's map object in a cycle. Below is the output for 10 iterations:\r\nmishok   11031  0.0  0.6  54536 13440 pts/5    R+   16:23   0:00 python memleak.py\r\nmishok   11031 86.9  3.5 112948 73736 pts/5    R+   16:23   0:30 python memleak.py\r\nAs you can see memory usage goes from 13MB to almost 74MB. Running valgrind points to some \"possible leaks\" in libxml2, but I'm not sure if that's relevant.\r\nThis script was tested with Mapnik 0.6.0, 0.6.1 and recent checkout of 0.7 branch and the results are the same for all versions.\r\nSystem: Ubuntu 9.10, Boost version:\" 1.38, Python: 2.6, libxml2: 2.7.5.","comments":7,"title":"Memory leak in load_map/load_map_from_string","updated_at":"2011-10-11T16:20:57Z","url":"https://api.github.com/repos/artemp/mapnik/issues/473","id":1877730,"assignee":null,"milestone":{"number":9,"created_at":"2011-10-11T15:50:23Z","due_on":"1970-01-01T09:21:03Z","title":"0.7.0","creator":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"url":"https://api.github.com/repos/artemp/mapnik/milestones/9","open_issues":1,"closed_issues":69,"description":"= Mapnik 0.7.0 =\r\n\r\nThe 0.7.0 release targets stability and usability of the Mapnik Core and brings notable advancements to the Datasource Plugins.\r\n\r\nSee the Release page: wiki:Release0.7.0\r\n\r\nSee the CHANGELOG: source:tags/release-0.7.0/CHANGELOG\r\n\r\nUsage, either via Python or XML stylesheets should be fully compatible with the 0.6.x series.\r\n\r\nNevertheless, this release brings improvements and fixes to the C++ core that warrant a major release and new a ABI version.\r\n\r\n== Plugins ==\r\n\r\n * Addition of '''GDAL raster overviews''' - You can now rapidly read large raster datasets (#54)\r\n  * Turn multiple geotiffs into a Bigtiff and build overviews with gdaladdo then read with the GDAL plugin\r\n  * Thanks Alberto and Craig for the initial patches and Dražen for great testing\r\n\r\n * Huge set of improvements to '''PostGIS Plugin'''\r\n  * The PostGIS plugin now supports custom placement of the BBOX query\r\n  * It is is able to skip initialization queries if you supply the 'geometry_field','srid',or 'extent'\r\n  * Errors are now thrown for queries with invalid syntax - should help in debugging complex SQL\r\n  * Thanks Migurski, Lennard, Avar and more for great ideas and testing\r\n  * Thanks Robert for awesome support and patches\r\n  *  #242, #260,  #363, #376, #384, #393, #414, #415, #426,  #433, #434, #449, #456\r\n\r\n== Python ==\r\n * Additional support for '''python pickling''' (near complete) (#345)\r\n  * Map pickling still needs some refinement, but most objects are nicely pickleable now\r\n  * Thanks Artem for great improvements using templating\r\n\r\n * Improvements to '''Python linking''' on Mac OSX (#380)\r\n  * Smarter default linking to the right Python framework (helps if multiple versions exist like on Snow Leopard + python 2.6)\r\n\r\n * Improvements to python docstrings\r\n  * Thanks Igor for contributing many more docstrings!\r\n\r\n== Core ==\r\n * Completed adding full support for '''PPC/ Big endian''' systems (#357)\r\n  * Ability to read binary data was completed for 0.6.1, but color support needed work and is now finished\r\n\r\n * Large extension to '''TextSymbolizer''' functionality by David Eastcott (r1341) and Jochen (r1254)\r\n\r\n * New support for semitransparency in png256 output (#477)\r\n\r\n * New 'gamma' attribute on PolygonSymbolizer to allow for seamless polygon edges (#428)\r\n\r\n * Support for writing map '''xml to string''' (#396)\r\n  * Call `mapnik.save_map_to_string(m)` to send a map to an xml stream\r\n \r\n * Support for '''relative paths''' in xml loaded from string(#440)\r\n  * Works with libxml2 entities even! Thanks Dražen!\r\n  * Tested with the latest OSM stylesheet.\r\n\r\n * Variety of bug and usability fixes (#392,#436,#448,#242,#301,#402,#413)\r\n ","state":"open"},"closed_at":"2011-10-11T16:20:57Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"html_url":"https://github.com/artemp/mapnik/issues/473","labels":[{"name":"Boost_Python_Binding","url":"https://api.github.com/repos/artemp/mapnik/labels/Boost_Python_Binding","color":"FFFFFF"}],"state":"closed"},"legacy":{"issue_id":1877730,"comment_id":2366851}}