I'm not too familiar with either glib or the Go runtime, does this correctly implement the reference and finalizer?