diff --git a/glib/gfile.go b/glib/gfile.go index bc24ccb..5789f34 100644 --- a/glib/gfile.go +++ b/glib/gfile.go @@ -156,6 +156,7 @@ func (v *File) Read(cancellable *Cancellable) (*FileInputStream, error) { defer C.g_error_free(gerr) return nil, errors.New(goString(gerr.message)) } + // TODO: use a finalizer here, so the caller wont have to Unref() return wrapFileInputStream(Take(unsafe.Pointer(c))), nil } diff --git a/glib/gobjectclass.go b/glib/gobjectclass.go index 23e2833..e4feef7 100644 --- a/glib/gobjectclass.go +++ b/glib/gobjectclass.go @@ -51,6 +51,7 @@ func (o *ObjectClass) ListProperties() []*ParamSpec { out := make([]*ParamSpec, 0) for _, prop := range (*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.GParamSpec)(nil))]*C.GParamSpec)(unsafe.Pointer(props))[:size:size] { + // TODO: use a finialized version that does not require an Unref out = append(out, ToParamSpec(unsafe.Pointer(prop))) } return out