ebassi / graphene

A thin layer of graphic data types
http://ebassi.github.io/graphene
Other
373 stars 80 forks source link

Add support for using g_autoptr with graphene types #254

Closed tintou closed 1 year ago

tintou commented 2 years ago

Proposed changes:

This is handy when writing an application.

ebassi commented 2 years ago

To be honest, if you're writing a C application I'd recommend to use Graphene types on the stack instead of using the heap; using g_autoptr works only if you're copying data from out of properties or signals.

tintou commented 2 years ago

Yes.

In my use-case I have a GList of points so I wanted to use a g_autolist(graphene_point_t) my_list;

ebassi commented 1 year ago

I'm sorry to say, but a linked list of points is probably the most inefficient way you could find. I'd recommend a GArray, if you wanted to have the equivalent of a resizing C array of graphene_point_t.

Having said that, I don't have any particular objections to this pull request.