NextAccessPriority is the measure used to determine which frames are likely to be needed again soon. This information helps choose the memory to be spooled out to disk when image memory usage approaches the allowed limits.
When an McRegionAccess is released after accessing an McFrame or when McRegionAccess.UnlockPixelPointer is called, that frame's NextAccessPriority is automatically brought up to a minimum value of 100. Frames placed on the undo stack are given a value of 10. During sequence playback, frames are assigned NextAccessPriority values to try to give the ones ahead in the playback sequence higher priority than ones behind.
The property may be set to any non-negative value, with higher values indicating that the frame will be used again sooner. The property value will decay linearly over time, so that after about five minutes with no frame access and no assignment to the property, its value will have dropped to one thousandth of its original value (at which point it decays no more). This algorithm ensures that more recently accessed frames are given a higher priority than ones long ignored, but even among very old frames a higher original NextAccessPriority will still take precedence.
If assigned a negative value, then the NextAccessPriority is set to the default, just-accessed value of 100 or to 101 if this is the active frame of its parent image..
For images created with the mcicfContiguous mcImageCreateFlags Flag argument to the McImages.Add method, all frames share the same NextAccessPriority.