[asterisk-dev] ast_frame allocation/free question

Sergio Garcia Murillo sergio.garcia at fontventa.com
Tue Nov 27 14:39:17 CST 2007


From: "Kevin P. Fleming" <kpfleming at digium.com>
> Sergio Garcia Murillo wrote:
>
> > I agree, but I think that it's a usually a good practice that the one
that
> > allocates
> > the memory is the reponsible of freeing it. What I don't really see is
why
> > the
> > apps need to call the ast_frfree on frames they have just readen.
>
> This makes no sense; once chan_sip has fed you a frame of audio data,
> why should it care who frees it, and more importantly, how could it
> possibly know that the frame is no longer needed?
>

Just changing your phrase:
This makes no sense; once my applicaton has fed you a frame of audio data,
why should it care who frees it, and more importantly, how could it
possibly know that the frame is no longer needed?

Best regards
Sergio






More information about the asterisk-dev mailing list