Be GNOME, my friend

This blog is about hacking, Igalia and maybe some personal opinions

About

I'm a Gnome Hacker working for Igalia and living in A Coruña, Galiza.

Archive for February, 2011

Fanciful memory management

Thursday, February 24th, 2011

/* gcc -Wall -Werror -o references `pkg-config –cflags –libs gstreamer-0.10` references.c */ #include <gst/gst.h> #include <glib-object.h> int main(int argc, char *argv[]) { GstElement *old_object, *object; gst_init(&argc, &argv); object = gst_element_factory_make(“playbin2″, “playbin”); old_object = object; g_object_unref(object); object = gst_element_factory_make(“playbin2″, “playbin”); g_print(“old_object: %pn”, old_object); g_print(“object: %pn”, object); if (old_object == object) { g_print(“pointers are the same!n”); } […]

Read the rest of this entry »