Re: gtk_tree_model_get() --> when to free results???



Hi Olivier,

I've just browsed over the docs from glib, gobject and gtk. I though these rules are somwhere in there, but I didn't found them. I've also looked at
http://developer.gnome.org/doc/guides/
http://developer.gnome.org/doc/tutorials/

Now the question is where do the belong?

I fancy the idea of having a rules and conventions document (coding practice) and install that among the other docs. Then libs that adhere to these guide-line and just link that document in there introduction.

This only makes sense if we can come up with some more such conventions.
What do others think of this? Ideas?

Stefan

Stefan Kost wrote:

Hi Olivier,

I am afraid this report is invalid. It is common behaviour in
glib/gobject based applications that when returning data
* gobjects are reffed and need to be unreffed when done
* strings are strdup'ed and should be freed (unless they are marked as
const)
such can't be done for pointers as they are opaque to the system.


your claim may be 100% true, it probably is, but it doesn't affect my
bug report.

I'm claiming that from a app-developer point of view, the documentation
could be improved such that coding will be more productive.

The documentation is there to facilitate app-developers to make good use
of gtk, and exploit all the possibilities of gtk in the right way. The
better the documentation, the better the app-developers can make use of
gtk, the more and better gtk apps we will get. Documentation is *very*
important, and every improvement of the documentation is thus an
important improvement.

regards,
        Olivier





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]