GNOME Bugzilla – Bug 695050
Compact classes can silently leak memory
Last modified: 2018-05-22 14:42:51 UTC
Consider following case: [Compact] class LeakMemory<G> { G g; } LeakMemory<Gtk.Widget>? lm = new LeakMemory<Gtk.Widget>(); lm.g = new Gtk.Window(); lm = null; // lm.g memory is freed, right? Proposed solution: - Add warning for old-style generics that contains generic fields - Add attribute [GenericDtor] or similar (possibly [GenericMethods] as well) which allows to pass the generic attributes via arguments rather then store in class.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/360.