From 551cf3be919acb75ee740fc8a835eba6191db73a Mon Sep 17 00:00:00 2001 From: sauwming Date: Mon, 9 Dec 2024 12:15:19 +0800 Subject: [PATCH] Modify port warning comment --- pjmedia/src/pjmedia/port.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pjmedia/src/pjmedia/port.c b/pjmedia/src/pjmedia/port.c index d8b77a20a2..2286fd0439 100644 --- a/pjmedia/src/pjmedia/port.c +++ b/pjmedia/src/pjmedia/port.c @@ -163,8 +163,12 @@ PJ_DEF(pj_status_t) pjmedia_port_init_grp_lock( pjmedia_port *port, * If media port is using app's pool, and the app destroys the port * and then destroys the pool immediately, it may cause crash as the port * may have not really been destroyed and may still be accessed. - * If port uses app's pool, it needs to implement on_destroy() for releasing - * the pool, so here we check availability of on_destroy implementation. + * + * Thus, media port needs to create and manage its own pool. Since + * app MUST NOT free this pool, port typically needs to implement + * on_destroy() for releasing the pool. Alternatively, port can also + * add a group lock handler for this purpose, but since we can't check + * this, here we just check the availability of on_destroy implementation. */ if (port->on_destroy == NULL) { PJ_LOG(2,(THIS_FILE, "Warning! Port %s on_destroy() not found. To "