<?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 Garbage disposal error in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/garbage-disposal-error/m-p/1155584#M7947</link>
    <description>&lt;P&gt;Has anyone encountered an error that states the row declared has already been disposed and cannot be manipulated? How do I resolve this error? Thanks for your help!&lt;/P&gt;&lt;P&gt;Here is my code below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;QueryFilter qf = new QueryFilter&lt;BR /&gt;{&lt;BR /&gt;WhereClause = CokeysWhereClause,&lt;BR /&gt;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;using (var rowCursor = HzTable.Search(qf))&lt;BR /&gt;{&lt;BR /&gt;while (rowCursor.MoveNext())&lt;BR /&gt;{&lt;BR /&gt;foreach (var compPct in compPcts)&lt;BR /&gt;{&lt;BR /&gt;using (Row row = rowCursor.Current)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;var topHz = Convert.ToInt32(row["hzdept_r"]);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// disposed error occurs in the second loop&lt;BR /&gt;var bottomHz = Convert.ToInt32(row["hzdepb_r"]);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 21 Mar 2022 06:52:56 GMT</pubDate>
    <dc:creator>tzz_12</dc:creator>
    <dc:date>2022-03-21T06:52:56Z</dc:date>
    <item>
      <title>Garbage disposal error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/garbage-disposal-error/m-p/1155584#M7947</link>
      <description>&lt;P&gt;Has anyone encountered an error that states the row declared has already been disposed and cannot be manipulated? How do I resolve this error? Thanks for your help!&lt;/P&gt;&lt;P&gt;Here is my code below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;QueryFilter qf = new QueryFilter&lt;BR /&gt;{&lt;BR /&gt;WhereClause = CokeysWhereClause,&lt;BR /&gt;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;using (var rowCursor = HzTable.Search(qf))&lt;BR /&gt;{&lt;BR /&gt;while (rowCursor.MoveNext())&lt;BR /&gt;{&lt;BR /&gt;foreach (var compPct in compPcts)&lt;BR /&gt;{&lt;BR /&gt;using (Row row = rowCursor.Current)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;var topHz = Convert.ToInt32(row["hzdept_r"]);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// disposed error occurs in the second loop&lt;BR /&gt;var bottomHz = Convert.ToInt32(row["hzdepb_r"]);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 06:52:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/garbage-disposal-error/m-p/1155584#M7947</guid>
      <dc:creator>tzz_12</dc:creator>
      <dc:date>2022-03-21T06:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage disposal error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/garbage-disposal-error/m-p/1155659#M7948</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think you must change two cycles by places:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using (Row row = rowCursor.Current)
{
    var topHz = Convert.ToInt32(row["hzdept_r"]);
    var bottomHz = Convert.ToInt32(row["hzdepb_r"]);
    foreach (var compPct in compPcts)
    {
&lt;/LI-CODE&gt;&lt;P&gt;rowCursor.Current&amp;nbsp; can be read once.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 12:19:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/garbage-disposal-error/m-p/1155659#M7948</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-03-21T12:19:02Z</dc:date>
    </item>
  </channel>
</rss>

