On 2026-Feb-05, Chao Li wrote: > Exactly. In this case, memory leaking is not a problem at all. My > thinking was that once we do decide to free the top-level object, it > feels more consistent and less surprising to also free what it owns, > even if the lifetime is effectively the whole process. It’s less about > resource pressure and more about keeping the ownership model clear for > future readers and maintenance.
Maybe we should just change the "pg_free(state)" to "/* no point freeing memory */" or something like that. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "We're here to devour each other alive" (Hobbes)
