In ArcObjects, is it permissible to modify and update a feature after the feature cursor (which was used to retrieve the feature) has been released?
That is, do features in any way retain a link to the cursor through which they were retrieved?
// retrieve a feature through a recycling feature cursor: IFeatureClass featureClass = …; IFeatureCursor featureCursor = featureClass.Search(nothing, true); IFeature feature = featureCursor.NextFeature(); // release the feature cursor: Marshal.FinalReleaseComObject(featureCursor); // QUESTION: can the feature still be modified and updated? feature.Value(…) = …; feature.Store();
- I'm programming against ArcGIS versions 9.3 and 10.
- Does it possibly make a difference whether the cursor is recycling or non-recycling?
P.S.: I have tried this under both ArcGIS versions 9.3 and 10, and it seems to work fine; however, that doesn't mean that this will always work, nor that it should be done. I haven't found any hints about this issue in ESRI's online API documentation.