<?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: Disconnecting Events and Handlers in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disconnecting-events-and-handlers/m-p/661647#M61756</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your reply....but is it essential ??&amp;nbsp; because I have used this in my application and not able to see the big difference after using this.. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;A href="https://dojotoolkit.org/reference-guide/1.7/dojo/disconnect.html"&gt;dojo.disconnect&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Oct 2012 03:58:31 GMT</pubDate>
    <dc:creator>SunilPalkar</dc:creator>
    <dc:date>2012-10-23T03:58:31Z</dc:date>
    <item>
      <title>Disconnecting Events and Handlers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disconnecting-events-and-handlers/m-p/661645#M61754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good Morning,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am new one to JSAPI . Its regarding to events and handlers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I read some wherever that you need to disconnects events to avoid memory leaks. Is it necessary because in my sample application I am using lots of events on mouse move ,mouse click&amp;nbsp; etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So any help with proper explanation will be great !!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 11:58:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disconnecting-events-and-handlers/m-p/661645#M61754</guid>
      <dc:creator>SunilPalkar</dc:creator>
      <dc:date>2012-10-22T11:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Disconnecting Events and Handlers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disconnecting-events-and-handlers/m-p/661646#M61755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A class="jive-link-external-small" href="https://dojotoolkit.org/reference-guide/1.7/dojo/disconnect.html" rel="nofollow" target="_blank"&gt;dojo.disconnect&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 14:25:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disconnecting-events-and-handlers/m-p/661646#M61755</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-10-22T14:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Disconnecting Events and Handlers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disconnecting-events-and-handlers/m-p/661647#M61756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your reply....but is it essential ??&amp;nbsp; because I have used this in my application and not able to see the big difference after using this.. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;A href="https://dojotoolkit.org/reference-guide/1.7/dojo/disconnect.html"&gt;dojo.disconnect&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 03:58:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disconnecting-events-and-handlers/m-p/661647#M61756</guid>
      <dc:creator>SunilPalkar</dc:creator>
      <dc:date>2012-10-23T03:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Disconnecting Events and Handlers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disconnecting-events-and-handlers/m-p/661648#M61757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for your reply....but is it essential ??&amp;nbsp; because I have used this in my application and not able to see the big difference after using this..&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

//Run this code to start the listener
&lt;SPAN style="color: #000000; font-family: monospace;"&gt;listener = dojo&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;connect&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;layer&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #999999; font-family: monospace;"&gt;"onMouseOver"&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000088; font-family: monospace;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;evt&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;{
&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;&amp;nbsp; //do something on hover
&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;}&lt;/SPAN&gt;
//run this code to disconnect the listener
dojo.disconnect(listener)

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:59:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disconnecting-events-and-handlers/m-p/661648#M61757</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2021-12-12T03:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Disconnecting Events and Handlers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disconnecting-events-and-handlers/m-p/661649#M61758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You don't need to worry about memory leaks on page unload from event handlers. Javascript frameworks like dojo and jquery do clean up, including removal of event handlers, when the page unloads.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of greater concern is performance of the application while it's running. Asynchronous web apps can use up a lot of memory fast. &lt;/SPAN&gt;&lt;A href="https://developers.google.com/speed/articles/optimizing-javascript"&gt;https://developers.google.com/speed/articles/optimizing-javascript&lt;/A&gt;&lt;SPAN&gt; Check this out for ways to improve performance and avoid coding that may cause memory leaks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 14:38:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disconnecting-events-and-handlers/m-p/661649#M61758</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2012-10-25T14:38:02Z</dc:date>
    </item>
  </channel>
</rss>

