Is anybody actually using the glibmm variant stuff? I'm serializing a
complex variant and end up losing ~30 megabytes every time [1]

I'm on Gtkmm 3.4, but I've run this test case in jhbuild:

#include <glibmm/variant.h>

int main() {
{
std::vector<gint64> ints;
 ints.push_back(2);
Glib::VariantContainerBase vints = Glib::Variant< std::vector<gint64>
>::create(ints);
 ints.clear();
}

return 0;
}

Valgrind reports:
==2369== LEAK SUMMARY:
==2369==    definitely lost: 2 bytes in 1 blocks
==2369==    indirectly lost: 0 bytes in 0 blocks
==2369==      possibly lost: 4,032 bytes in 7 blocks
==2369==    still reachable: 5,595 bytes in 14 blocks

Am I not supposed to call ::create() like this?

Thanks.

[1] https://github.com/talisein/Horizon/blob/master/src/image_cache.cpp
ImageData::get_variant()
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to