next up previous contents
Next: The Language Bindings Up: Arrays Previous: Independent and borrowed arrays   Contents

The Life of an Array

The existence of borrowed arrays causes the arrays to deviate from the normal reference counting pattern. Arrays are reference counted. An array's resources are reclaimed when the reference count goes to zero. However, a borrowed array's array element data will disappear whenever the source of the borrowed data determines that it should regardless of the reference count in corresponding the SIDL array. This behavior means that developers should consider any SIDL array that they did not create themselves, for example incoming arguments to methods, as potential borrowed arrays. When a method wants to keep a copy of an array that might be a borrowed array, it should use the smartCopy method documented below.

Here are some rules of thumb about the use of borrowed arrays:


next up previous contents
Next: The Language Bindings Up: Arrays Previous: Independent and borrowed arrays   Contents


babel-0.8.6
users_guide Last Modified 2003-07-09

http://www.llnl.gov/CASC/components
components@llnl.gov