[gtkada] memory allocation problems in Gtkada 3.4.2?

Rob Groen robgr at xs4all.nl
Sat Mar 22 10:45:44 CET 2014


 

On 2014-03-21 10:30, Emmanuel Briot wrote: 

>> It then queried the created object for its parent types, its properties and its signals. This was done for a large number of Gtk widgets, i.e. the ones that derive from Gobject_Record, that are not interfaces and that have a Gtk_New method. I programmed it this way because I don't want to "with" all the required Gtk.xxx packages, to tedious and inflexible. In Gtkada 2.24.2 this all works well.
> 
> Basically trading clean code for short code. That's not a style I would personally recommend.
> This code is also very unsafe, since you are basically casting types in a very uncontrolled
> manner (creating a GObject_Record and putting a gtk_button inside, or other similar things).
> 
> I don't think that's a good approach.

I was afraid that you were going to say something like that. And of
course, you are 100% right. Since the code that produces the list of
widgets and their get_type functions is generated, I am going to change
the generator to generate the with/use clauses and the appropriate
gtk_new's. Will post to this list and on this subject again when I have
some results. 

Regards, Rob 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/gtkada/attachments/20140322/cc43f74a/attachment.html>


More information about the gtkada mailing list