After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 592974 - Should clean up class fields in class/base_finalize
Should clean up class fields in class/base_finalize
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Code Generator: GObject
0.7.x
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-25 05:14 UTC by Sebastian Dröge (slomo)
Modified: 2018-05-22 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2009-08-25 05:14:04 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.
Comment 1 Sebastian Dröge (slomo) 2013-07-17 13:23:11 UTC
Ping?
Comment 2 GNOME Infrastructure Team 2018-05-22 13:22:43 UTC
-- 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.