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 625170 - Generics don't work in compact classes
Generics don't work in compact classes
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Generics
unspecified
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-24 07:02 UTC by Rafael Monica
Modified: 2018-05-22 13:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example demonstrating bug (211 bytes, text/x-vala)
2010-07-24 07:02 UTC, Rafael Monica
Details
Test case - vala (197 bytes, text/x-vala)
2010-07-25 19:58 UTC, Maciej (Matthew) Piechotka
Details
Test case - c (1.18 KB, text/x-csrc)
2010-07-25 20:03 UTC, Maciej (Matthew) Piechotka
Details

Description Rafael Monica 2010-07-24 07:02:38 UTC
Created attachment 166477 [details]
example demonstrating bug

It seems that Gee.TreeMap doesn't release all the references it has to the items it contains. See the example code, where I would expect a message from the destructor.
Comment 1 Maciej (Matthew) Piechotka 2010-07-25 19:57:20 UTC
Problem is in vala code generation.
Comment 2 Maciej (Matthew) Piechotka 2010-07-25 19:58:22 UTC
Created attachment 166538 [details]
Test case - vala
Comment 3 Maciej (Matthew) Piechotka 2010-07-25 20:03:59 UTC
Created attachment 166539 [details]
Test case - c

Code generated is:

struct _Test {
        gpointer key;
};

void test_free (Test* self) {
        g_slice_free (Test, self);
}

Instead of:

struct _Test {
        GDestroyNotify g_destroy_func;
        gpointer key;
};

void test_free (Test* self) {
        self->g_destroy_func(self->key);
        g_slice_free (Test, self);
}
Comment 4 Maciej (Matthew) Piechotka 2010-08-03 09:49:52 UTC
(In reply to comment #0)
> Created an attachment (id=166477) [details]
> example demonstrating bug
> 
> It seems that Gee.TreeMap doesn't release all the references it has to the
> items it contains. See the example code, where I would expect a message from
> the destructor.

While I belive that it is vala poblem the workaround is present in both master and 0.6 branch.
Comment 5 GNOME Infrastructure Team 2018-05-22 13:43:27 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/126.