-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call g_object_ref_sink() only on floating objects #80
Comments
It seems like you currently don't handle floating references at all: there is no call to It is necessary for bindings to handle floating references correctly (and not expose them to the target language!). See https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#floating-ref for details how this is supposed to work, but for one thing you'll have to call See also #108 (comment) which suggests you handle |
salewski@nuc ~ $ grep g_object_ref_sink ~/.nimble/pkgs/gintro-#head/gintro/* |wc -l It is nice that you try to help. But most of gintro seems to work fine. I would have to test for memory leaks more indeed. |
Hmm searching in this repository for |
The bindings modules are created by the gen.nim generator script during install of the gintro module, that is nimble install gintro or nimble install gintro@head to get latest changes (recommended currently). That will give you
Indeed Mr. Rumpf does not like these "on the fly" generation that much, I think we already discussed it too. Later, when we may have a few thousand or at least a few hundred Nim GTK users we may try to ship pre-generated module files. But currently I can not provide these, as that would mean creating weekly fresh files for Linux, Mac and Windows, maybe for 32 and 64 bit. |
Sorry, it is nimble install gintro@#head |
There is a bug in template gobjectTemp(): untyped for gintro <= v0.7.7
methodBuffer.writeLine(" discard g_object_ref_sink(result.impl)")
ref_sink should be called only for floating objects like most widgets, but not for GtkWindow, GtkApplicationWindow and other none floating windows.
The text was updated successfully, but these errors were encountered: