Passing SafeArrays in C++
Be careful when managing SafeArray memory. If you receive a SafeArray
from the SolidWorks product, you are responsible for destroying it. Also,
if you pass a SafeArray to the SolidWorks product, SolidWorks does not
destroy the SafeArray; you are responsible for destroying it.
See:
Return Values
for information and examples of handling SafeArray and VARIANT return
values.
Get
Spline Points (C++ COM) for an example of accessing array information
uses the IInterfacePtr and SafeDoubleArray
templates.