When I delete a feature in my map, I have a list of child features that also need to be deleted. When the parent is deleted, the child features of a different type also need to be deleted. So I trigger this code to get this done. When a delete is triggered, i successfully get the list of Rows, then a call delete and I get this error on the .Execute() line
"Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt”
<SPAN class="comment token">//Delete all of the lists created above</SPAN>
<SPAN class="keyword token">foreach</SPAN> <SPAN class="punctuation token">(</SPAN>List<SPAN class="operator token"><</SPAN>Row<SPAN class="operator token">></SPAN> individualRowList <SPAN class="keyword token">in</SPAN> ListsOfLists<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="operator token">!</SPAN>individualRowList<SPAN class="punctuation token">.</SPAN><SPAN class="token function">IsNullOrEmpty</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
EditOperation deleteOperation <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">EditOperation</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
Name <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">string</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">Format</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Deleted {0}"</SPAN><SPAN class="punctuation token">,</SPAN> individualRowList<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN>
SelectModifiedFeatures <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">,</SPAN>
SelectNewFeatures <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">false</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN>
deleteOperation<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Delete</SPAN><SPAN class="punctuation token">(</SPAN>individualRowList<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
deleteOperation<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Execute</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>