in src/umockcallrecorder.c [149:170]
void umockcallrecorder_destroy(UMOCKCALLRECORDER_HANDLE umock_call_recorder)
{
/* Codes_SRS_UMOCKCALLRECORDER_01_004: [ If umock_call_recorder is NULL, umockcallrecorder_destroy shall do nothing. ]*/
if (umock_call_recorder != NULL)
{
/* Codes_SRS_UMOCKCALLRECORDER_01_003: [ umockcallrecorder_destroy shall free the resources associated with a the call recorder identified by the umock_call_recorder argument. ]*/
internal_umockcallrecorder_reset_all_calls(umock_call_recorder);
if (umock_call_recorder->actual_calls_string != NULL)
{
umockalloc_free(umock_call_recorder->actual_calls_string);
}
if (umock_call_recorder->expected_calls_string != NULL)
{
umockalloc_free(umock_call_recorder->expected_calls_string);
}
if (umock_call_recorder->lock != NULL)
{
umock_call_recorder->lock->destroy(umock_call_recorder->lock);
}
umockalloc_free(umock_call_recorder);
}
}