From: Leonard T. <th...@pr...> - 2021-11-24 15:18:07
|
Hello, I wonder how I am supposed to release memory after I do not need a widget anymore. Should I use destroy()? Or unref()? Or is the binding taking care of releasing memory after I removed the widget from its parent and I do not have to worry? In a more complex project I am working on I use a FileChooserWidget which causes segmentation faults when I destroy it and afterwards change folder content which I previously watched. This is because the FileChooserWidget does not properly clean up after itself when I call destroy() on it and so it tries to execute callbacks that make no sense after destroying... I have read a lot about memory management in GTK but could not find an exact answer to my questions for the ruby bindings. Hope to find some insights here. Kind regards, Leonard |