ImageGear for C and C++ on Windows v19.9 - Updated
IG_REC_wstring_array_free
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Utility Functions > IG_REC_wstring_array_free

Deletes a string array previously allocated by the toolkit.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_wstring_array_free(
   AT_WCHAR** lplpStringArray,
   AT_INT nArrayLength
);

Arguments:

Name Type Description
lplpStringArray AT_WCHAR** String array to be deleted.
nArrayLength AT_INT Number of strings in the array.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
HIGEAR higImage = 0;
HIG_REC_IMAGE higRecImage = 0; 
AT_WCHAR** lplpAlternativeCodes = 0;
AT_INT nAlternativeCodesCount = 0;

ErrCount += IG_load_file("Image.tif", &higImage); 
ErrCount += IG_REC_image_import(higImage, &higRecImage);
ErrCount += IG_REC_image_recognize(higRecImage);
ErrCount += IG_REC_alternative_letter_codes_get(higRecImage,
    &lplpAlternativeCodes,  &nAlternativeCodesCount);

//...

ErrCount += IG_REC_wstring_array_free(lplpAlternativeCodes, nAlternativeCodesCount);
ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);

Remarks:

This functions deletes arrays being allocated by such functions as IG_REC_word_suggestions_get, IG_REC_alternative_letter_codes_get.