private static void check(IFeatureWorkspace fws) { IFeatureCursor c = fws.OpenFeatureClass("XYZ").Search(null, false); IFeature f = c.NextFeature(); m_List = null; GC.Collect(2); m_List = new List<IFeature>(); while (f != null) { m_List.Add(f); f = c.NextFeature(); } Marshal.FinalReleaseComObject(c); }
For anyone having this issue in 10.4.1. Looks like its a bug in ArcObjects. Doesn't get fixed until 10.5.1.
arcobjects - IFeatureCursor.NextFeature not releasing memory - Geographic Information Systems Stack Exchange
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.