[asterisk-dev] pjsip headers and dlg->pool vs tdata->pool

Alex Hermann alex-lists at wenlex.nl
Thu Apr 28 05:24:39 CDT 2022

On donderdag 28 april 2022 12:07:34 CEST Joshua C. Colp wrote:
> There isn't any real documentation regarding pools and their usage,
> what to use ultimately depends on what you're doing and the lifetime
> of it. In the case of the review you've linked, tdata could live past
> the lifetime of the dialog, and thus everything part of the tdata
> should be allocated from its pool and use its lifetime. For the
> dialplan functions which store the information on a datastore it is
> perfectly fine to use the dialog pool because the lifetime of the
> dialog and the lifetime of the datastore are the same, driven by the
> lifetime of the channel.

Yeah, guessed so. The hard part is finding out what each lifetime is. 

Alex Hermann

More information about the asterisk-dev mailing list