 |
The pointer returned by QSget_probname is a handle to a string that is allocated in the function. When the string is no longer needed, the memory should be freed by the user; since the memory for the string is allocated by the QSopt library, the memory must be freed with a call to QSfree and not by the system free() function. (Note that without the call to QSfree , the QSopt library will not free the memory for the string, even after a call to QSfree_prob(p) .
|