lib.pointer Class
Namespace: lib
Pointer object compatible with C pointer
Description
MATLAB® automatically converts arguments passed by reference to a function in an
external library. A passed-by-reference argument in the function signature has type names
ending with Ptr
or PtrPtr
. Use a pointer object instead
of automatic conversion in the following situations.
The function modifies data in an input argument.
You are passing large amounts of data, and you want to control when MATLAB makes copies of the data.
The library stores and uses the pointer, so you want the MATLAB function to control the lifetime of the
lib.pointer
object.
Creation
To create a lib.pointer
object, use the MATLAB
libpointer
function.
A library function can return a lib.pointer
object. Use the
setdatatype
method to convert the argument manually to use in MATLAB.
Properties
Methods
Examples
Version History
Introduced before R2006a