This function should be used to free the blocks of memory allocated by QSopt functions when the memory is no longer needed by the user. Only pointers to data of standard type (that is, char , int , double ) and pointers to pointers of these types should be passed to QSfree; pointers to structures created by QSopt functions should be passed to the structure-specific functions, that is, QSfree_prob or QSfree_basis . Examples of blocks of memory allocated by a QSopt function are the locations of the strings returned by QSget_probname or QSget_objname , or the locations of the strings for the column names returned by QSget_colnames . Other examples include arguments in QSget_columns , QSget_columns_list , QSget_rownames , QSget_rows , and QSget_rows_list . It is important to note that this function should not be used to free memory allocated by the system malloc () functions. (The functionality of QSfree is needed to deal with the partitioned memory system used in the Microsoft Windows operating system. By altering the design of the QSopt library, it would be possible to avoid the allocation of standard types by the QSopt functions, but only at the expense of having a less intuitive interface for the functions that return collections of strings, like those returning the column names and row names. Under Unix-like systems, you should be able to simply use the standard free () function rather than QSfree if you prefer to do so.)
|