<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why 'del mxd' in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/why-del-mxd/m-p/432210#M33990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This also clears space in memory, which helps if your program is memory intensive.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jun 2011 16:13:13 GMT</pubDate>
    <dc:creator>MikeMacRae</dc:creator>
    <dc:date>2011-06-09T16:13:13Z</dc:date>
    <item>
      <title>Why 'del mxd'</title>
      <link>https://community.esri.com/t5/python-questions/why-del-mxd/m-p/432206#M33986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;could anyone advise on the significance/requirement to delete the mxd variable after use, all example code ends with 'del mxd'?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 18:55:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-del-mxd/m-p/432206#M33986</guid>
      <dc:creator>AnthonyFarndon</dc:creator>
      <dc:date>2011-05-12T18:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why 'del mxd'</title>
      <link>https://community.esri.com/t5/python-questions/why-del-mxd/m-p/432207#M33987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It just deletes the reference to the *.mxd...called clean-up.&amp;nbsp; Not necessary unless you are running many processes, but is generally good practice (think teenagers and their rooms ... clean-up is good)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 19:14:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-del-mxd/m-p/432207#M33987</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2011-05-12T19:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why 'del mxd'</title>
      <link>https://community.esri.com/t5/python-questions/why-del-mxd/m-p/432208#M33988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The 'mxd' variable will place a lock on the MXD.&amp;nbsp; Without deleting this variable, the lock will remain.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, you run a python script that makes some change to an MXD and you don't delete the 'mxd' variable.&amp;nbsp; Then you open this MXD in ArcMap, make another change and then try saving.&amp;nbsp; You will receive an error that it is in use.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 19:16:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-del-mxd/m-p/432208#M33988</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2011-05-12T19:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why 'del mxd'</title>
      <link>https://community.esri.com/t5/python-questions/why-del-mxd/m-p/432209#M33989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thank you, makes sense now&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 20:17:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-del-mxd/m-p/432209#M33989</guid>
      <dc:creator>AnthonyFarndon</dc:creator>
      <dc:date>2011-05-12T20:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why 'del mxd'</title>
      <link>https://community.esri.com/t5/python-questions/why-del-mxd/m-p/432210#M33990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This also clears space in memory, which helps if your program is memory intensive.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 16:13:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-del-mxd/m-p/432210#M33990</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2011-06-09T16:13:13Z</dc:date>
    </item>
  </channel>
</rss>

