[CE U17] COM/Interop does not release memory

It's quite similar to https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/201080/mstn-ce-u14-vba-and-com-interop-does-not-release-memory but this time it happens while accessing child elements.

When I run this code and do 1Mio Runs, my memory does not get released:

         CellElement element = comApp.ActiveModelReference.GetElementByID(elementId) as CellElement;

         for (int i = 0; i < nRuns; i++)
         {
            ElementEnumerator subElements = element.GetSubElements();

            while (subElements.MoveNext())
            {
               //...
            }

         }


My DGN only contained one Cell Element with 7 Shape Elements. Nothing fancy or special. I was able to exhaust all my RAM with this simple function. A DGN change did not released the memory either.
I've tested this on 10.16.02.34 and 10.17.01.62 and both behaved the same.

Parents Reply Children
No Data