Select to view content in your preferred language

Can arcpy.Eliminate_management cause memory leak?

383
1
05-16-2012 10:06 AM
sailiTang
Occasional Contributor
Hi,

    My python code needs to do eliminate many times. After around 1000 times, my code stoped with an error "out of memory". I am curious if Eliminate causes this? Anyone has the same problem? And did you solve it? I am using ArcInfo 10 and service pack 4.

Thanks

Saili
Tags (2)
0 Kudos
1 Reply
MathewCoyle
Honored Contributor
Pretty much all GP tools can cause a memory leak if run enough times in a single script. This is due mostly to the geoprocessing history logging I believe, and I could be mistaken, but I recall coming across that explanation at some point. The only work around I've found to this is to call your highly repetitive tools in functions in external scripts that can be imported, processed and unloaded for each iteration. I've only had to do this once, when doing various checks and analysis and then projecting an entire database to multiple different coordinate systems, but that was how I got it to work.

An alternative could be to simply turn off logging, but for some reason that didn't work for me.
0 Kudos