Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Conversation

@Therzok
Copy link
Contributor

@Therzok Therzok commented Sep 14, 2016

This fixes a few leaks caused by gstrdup-ing by firing and forgetting.

https://gist.github.com/Therzok/822d377e69476d172f434aa79ef74aed

@Therzok
Copy link
Contributor Author

Therzok commented Sep 14, 2016

cc @DavidKarlas @alanmcgovern

@Therzok
Copy link
Contributor Author

Therzok commented Sep 15, 2016

Actually, some of these bindings look incorrect. The char stuff should take in a simple char, gtk_label_get should be using an out string, ParseArgs should be using a ref array.

Only the paint/draw/pango stuff seem to be generated correctly now

@Therzok
Copy link
Contributor Author

Therzok commented Sep 15, 2016

Updated diff because the previous comment is now obsolete as the fixes have to the API have landed:
2295268
f66a1c8
8abc2ba


public string ReleaseNative (string native_var)
{
return $"GLib.Marshaller.Free ({native_var})";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does gtk-sharp depend already in a high enough version of mono to support interpolated strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jenkins does have Mono 4.4. I think we should bump the required version in the configure file.

In any case, I don't like this patch, but there's not much without rewriting the generator typesystem, and I prefer to do that in master.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to do that in master.

Yes please! But only after we release a gtk3.0 version ok? Otherwise we lose the stability that master has now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should bump the required version in the configure file.

Probably, but not only for this little patch. How about doing that after releasing a new gtk#2.x version? @meebey needs it for smuxi.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already depend on .NET 4.6 at build time (not runtime) for the string marshalling optimizations.

This fixes a few leaks caused by gstrdup-ing by firing and forgetting.
@Therzok Therzok merged commit 0ecd173 into gtk-sharp-2-12-branch Sep 15, 2016
@Therzok Therzok deleted the strings-free branch September 15, 2016 08:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants