Handle functions with multiple callbacks #367

Merged
jwharm merged 2 commits from notified-scope into main 2026-05-25 09:58:40 +02:00
Owner

Some functions have multiple callbacks with notified or async scope, but one of them has no DestroyNotify argument of its own. Java-GI used to allocate these in a global arena, leaking the allocated memory. To fix this, we now use the same arena for both callback allocations.

This also fixes the detection of DestroyNotify parameters, which means some function signatures have improved.

Also added a metadata fix for g_file_move_async to properly annotate the progress_callback scope.

Fixes #366

Some functions have multiple callbacks with notified or async scope, but one of them has no DestroyNotify argument of its own. Java-GI used to allocate these in a global arena, leaking the allocated memory. To fix this, we now use the same arena for both callback allocations. This also fixes the detection of DestroyNotify parameters, which means some function signatures have improved. Also added a metadata fix for `g_file_move_async` to properly annotate the `progress_callback` scope. Fixes #366
Some functions have multiple callbacks with notified or async scope,
but one of them has no DestroyNotify argument of its own. Java-GI used
to allocate these in a global arena, leaking the allocated memory. To
fix this, we now use the same arena for both callback allocations.

This also fixes the detection of DestroyNotify parameters, which means
some function signatures have improved.

Also added a metadata fix for `g_file_move_async` to properly annotate
the `progress_callback` scope.

Fixes #366
jwharm merged commit 582e1b860f into main 2026-05-25 09:58:40 +02:00
Sign in to join this conversation.
No description provided.