Actually this very Boolean parameter can really ruin your entire application and produce unexpected results if used in the wrong context.
What is Recycling?
Recycling is reusing the same memory location for creating features or rows.
To make a long story short, I'm going to explain it with pictures.
Here is a picture with a non-Recycling Cursor
Here is another one with a Recycling Cursor
Click the image to enlarge
When to use Recycling?
Recycling cursor is much more faster than non-recycling one. It is great for populating lists and printing values in the screen.
Here are some cases you want to use Recycling in
- Populating Features' attributes in a list
- Saving certain primitive features attributes (like objectid) in a collection
When not to use Recycling?
When capturing the feature or its geometry (or any other non-primitive reference) , DO NOT use Recycling cursor. If you did you will simply get the same feature (probably the last one) in all your collection because it is using the same memory location.
Here are some cases you must not use Recycling in
- Union the geometry of all features in a given cursor
- Saving the feature geometry in the Grid Tag or collections
- Comparing features
Hope that helped!
but we use boolean for comparing..!
ReplyDeleteand for which computer language we can use the recycling cursor?
@Manna
ReplyDeletegood question ;)
I should do some research to answer your question
this is a special Application Programming Interface called ArcObjects, its related to ESRI GIS product, very specific