On 2025/12/24 6:49, BALATON Zoltan wrote:
Our documentation says that memory regions are automatically freed when the owner dies and the reference counting to do this is also implemented. However this relies on the QOM free funtion that can only be set by creating objects with object_new but memory API only provides constructors that call object_initialize which clears the free function that prevents QOM to manage the memory region lifetime. Implement corresponding memory_region_new_* functions that do the same as the memory_region_init_* functions but create the memory region with object_new so the lifetime can be automatically managed by QOM as documented.
The documentation explains the existing functions so the discrepancy between them you see should be fixed by updating them, not adding new ones.
Regards, Akihiko Odaki
