Skip to content

[Question] Do GObject::Bindings need to be unbound manually to free memory? #176

Answered by hugopl
BigBoyBarney asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

Yes, you need to disconnect it manually or memory will leak, this is because we need to store a reference to the proc we use internally, otherwise it will be garbage collected and GObject will access invalid memory and crash.

However... I dislike this pattern and want to change this so I was working on a way to connect objects without the need to manually disconnect to avoid memory leaks, basic tests worked but need more tests to be ready.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BigBoyBarney
Comment options

Answer selected by BigBoyBarney
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #175 on January 27, 2025 13:56.