mono / gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
http://www.mono-project.com/GtkSharp
Other
424 stars 140 forks source link

Gtk# 2.12 branch: Gtk.Widget/SizeRequest leaks #259

Closed plprevost closed 3 years ago

plprevost commented 5 years ago

We've found a memory leak in the generated method "public Gtk.Requisition SizeRequest()" within Gtk.Widget class. Here is a suggestion to fix the bug: public Gtk.Requisition SizeRequest() { Gtk.Requisition requisition = Requisition; Gtk.Application.AssertMainThread(); gtk_widget_size_request(Handle, ref requisition); return requisition; }

Since this code is generated, any ideas on how to fix the code engine is greatly appreciated.

plprevost commented 3 years ago

Performance tests showed memory leak fixed.