<?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 Assigning new empty… in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Best-way-to-clear-Collection/m-p/51965#M6927</link>
    <description>Assigning new empty collection is probably the fastest way. Remove all Rows if you need to preserve fields, but&amp;nbsp;you can just keep an empty copy.
p.s. My limited investigation tells me that&amp;nbsp;you need to clean up memory in VBOs too, otherwise it is not released after process end until you initialize that VBO again in another process. None of the default VBOs do that. For example, Append rows in Collection manipulation will leave behind two copies of the data in memory. If another process runs that never uses that VBO - that memory seems to stay unavailable (even after GC.Collect). If you change Collection manipulation to empty all collections on clean up (or with an&amp;nbsp;action) - memory is reclaimed - resource pc process returns back to where it started on memory consumption.</description>
    <pubDate>Tue, 09 Oct 2018 15:14:00 GMT</pubDate>
    <dc:creator>AndreyKudinov</dc:creator>
    <dc:date>2018-10-09T15:14:00Z</dc:date>
    <item>
      <title>Best way to clear Collection?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Best-way-to-clear-Collection/m-p/51964#M6926</link>
      <description>In paragraph Process or Object design considerations of &lt;A href="https://help.blueprism.com/Operational-Support/Performance/Routine-Maintenance/1141009962/How-do-I-diagnose-and-avoid-Out-Of-Memory-issues.htm" target="test_blank"&gt;https://help.blueprism.com/Operational-Support/Performance/Routine-Maintenance/1141009962/How-do-I-diagnose-and-avoid-Out-Of-Memory-issues.htm&lt;/A&gt; developers are advised to clear Collections after usage with "Remove all Rows". Another possibility would be to assign an empty Collection to the Collection to be cleared.

My Questions:

- Which is better regarding performance and memory consumption?

- What happens behind the scenes in "Remove all Rows"? Is DataTable.Clear() called on the Collection itself?

Thanks to all responders!</description>
      <pubDate>Tue, 09 Oct 2018 12:21:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Best-way-to-clear-Collection/m-p/51964#M6926</guid>
      <dc:creator>BenjaminBechto1</dc:creator>
      <dc:date>2018-10-09T12:21:00Z</dc:date>
    </item>
    <item>
      <title>Assigning new empty…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Best-way-to-clear-Collection/m-p/51965#M6927</link>
      <description>Assigning new empty collection is probably the fastest way. Remove all Rows if you need to preserve fields, but&amp;nbsp;you can just keep an empty copy.
p.s. My limited investigation tells me that&amp;nbsp;you need to clean up memory in VBOs too, otherwise it is not released after process end until you initialize that VBO again in another process. None of the default VBOs do that. For example, Append rows in Collection manipulation will leave behind two copies of the data in memory. If another process runs that never uses that VBO - that memory seems to stay unavailable (even after GC.Collect). If you change Collection manipulation to empty all collections on clean up (or with an&amp;nbsp;action) - memory is reclaimed - resource pc process returns back to where it started on memory consumption.</description>
      <pubDate>Tue, 09 Oct 2018 15:14:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Best-way-to-clear-Collection/m-p/51965#M6927</guid>
      <dc:creator>AndreyKudinov</dc:creator>
      <dc:date>2018-10-09T15:14:00Z</dc:date>
    </item>
  </channel>
</rss>

