IceUtil::ScopedArray is a smart pointer class similar to
Handle. However, instead of managing the memory for class instances,
ScopedArray manages memory for an array. This class is provided mainly for use with the stream API. However, you can use it with arrays for other purposes.
Here is the definition of the template in full:
The class allows you to allocate an array on the heap and assign its pointer to a
ScopedArray instance. When the instance goes out of scope, it calls
delete on the array, so you do not need to deallocate the array explicitly yourself. This greatly reduces the risk of a memory leak due to an early return or uncaught exception.