VMask
defines copy and assignment with pointer-style
semantics. You can write stuff like:
VIMask fred( "mask" ); VMask jim; jim = fred;
This reads the file mask
, noting a pointer to the mask in fred
.
It then makes jim
also point to it, so jim
and fred
are
sharing the same underlying matrix values.
Internally, a VMask
object is just a pointer to a reference-counting
block, which in turn holds a pointer to the underlying VIPS MASK
type.
You can therefore efficiently pass VMask
objects to functions by
value, and return VMask
objects as function results.