|
External Development Guide: IDL Internals: String Processing |
|
Before an IDL_STRING can be discarded or re-used, it is important to release any dynamic memory it might be using. The IDL_StrDelete() function should be used to delete strings:
void IDL_StrDelete(IDL_STRING *str, IDL_MEMINT n)
where:
Pointer to one or more IDL_STRING descriptors which need their contents freed.
The number of descriptors.
IDL_StrDelete() deletes all dynamic memory used by the IDL_STRINGs. The descriptors contain garbage once this has been done, and their contents should not be used.
The IDL_Deltmp() function automatically calls IDL_StrDelete() when returning temporary variables of type IDL_TYP_STRING, so it is not necessary or desirable to call IDL_StrDelete() explicitly in this case.
IDL Online Help (March 06, 2007)