`t_buffer` should be released at the end of the function.