This is a question regarding an issue raised by this bug which Andre reported<br><br><a href="http://jira.openlaszlo.org/jira/browse/LPP-4688">http://jira.openlaszlo.org/jira/browse/LPP-4688</a><br><br>In his test case, he has code which creates a (globally)&nbsp; named dataset , creates a view which uses it in a datapath,
<br>then destroys the datapath and creates a new one with the same name<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method name=&quot;createDataset&quot; args=&quot;name, local, text&quot; &gt;&lt;![CDATA[<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var ds = new LzDataset(local ? this : canvas, {&quot;name&quot;:name});
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ds.appendChild(new LzDataElement(&quot;test&quot;, {}, [new LzDataText(text)]));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ds;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]]&gt;&lt;/method&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method name=&quot;test_1&quot; &gt;&lt;![CDATA[
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var ds = this.createDataset(&quot;dsdyn1&quot;, false, &quot;foo&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var text = new lz.text(this, {id:&quot;leak1&quot;, datapath:&quot;dsdyn1:/test/text()&quot;, visible:false});<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
ds.destroy();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ds = this.createDataset(&quot;dsdyn1&quot;, false, &quot;bar&quot;);<br><br>There&#39;s two issues, one is how to make sure that when you destroy a dataset, all the views which are bound to it
<br>release their pointers. <br><br>The other issue is should there be some mechanism so that if a new dataset is created with the same name, that<br>views which reference it in their datapath should rebind to the new dataset automatically? That seems like a hard
<br>problem to me, and aside from the cost and complexity to maintain it. I don&#39;t know how often people<br>destroy and create datasets, but I always considered them as permanent, in that you can<br>reload them or clear out their contents, but destroying and recreating one with the same
<br>name is something I had not considered. <br><br><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br>