[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to pass array from dll into IDL?




In article <3B465516.C851CAB4@home.com>, Randall Frank <rjfrank1@home.com> writes:
> Nigel,
> 	Make sure you supply a free_cb function in your example.
> 
> The line:
> 
>      array = IDL_ImportArray(1, dims, IDL_TYP_BYTE, data, NULL, NULL);
> 
> should read something like:
> 
>      array = IDL_ImportArray(1, dims, IDL_TYP_BYTE, data,
> (IDL_ARRAY_FREE_CB)free, NULL);
> 
> to avoid a memory leak in your example.
> 
> FWIW.
> 

Very good point!

-- 
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK 
E-mail :    nmw@ion.le.ac.uk 
Phone :     +44 (0)116 2523568, Fax : +44 (0)116 2523555