GNOME Bugzilla – Bug 592974
Should clean up class fields in class/base_finalize
Last modified: 2018-05-22 13:22:43 UTC
Hi, currently the memory managment features of vala are not applied to class fields. These should be cleaned up in class/base_finalize. Example: public class Test : GLib.Object { private class Foo foo = new Foo(); } public class Foo : GLib.Object { } public void main() { new Test (); } Here the foo instance should be cleaned up in class_finalize. It might be a problem to detect where to clean up though, if fields are assigned a) from instance/class/virtual methods or static ctors they should be cleaned up in base_finalize of the corresponding class and b) if they're set in static methods, class ctors or are directly initialized (above example) they should be cleaned up in the class_finalize of the corresponding class.
Ping?
-- 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/42.