Why 'del mxd'

Discussion created by tony.farndon on May 12, 2011
Latest reply on Jun 9, 2011 by BrokenLegMike

could anyone advise on the significance/requirement to delete the mxd variable after use, all example code ends with 'del mxd'?

I have some arcpy.mapping code wrapped up in a class, so wonder why, if at all, I need to do this. Should I call this in the class __del__ deconstructor perhaps, call del on the class/object itself after use or add in a custom deconstructor function after I have finished with the object to call del mxd on all the mxd's used in the class?