[Discussion] Did you ever forget to un_ref any GObject?

Luis de Bethencourt luis at debethencourt.com
Mon Jan 5 06:58:01 PST 2015


The contrary happens to me. I tend to forget some of the situations where
you don't need to unref, I unref and then it segfaults. I think I do this
mostly due to the positive reinforcement of segfaults being a lot easier to
fix than memory leaks.

Over time you stop checking the documentation and start internalizing it.

Luis

On 5 January 2015 at 13:47, hxpax <thehxpax at gmail.com> wrote:

> Hi, all.
>
> I find it's always hard for me to decide if un_ref is needed for a GObject
> instance.
> Every time I meet a new GObject or a new method, I had to check the
> documentation.
>
> So, did you ever been hesitant on a un_ref problem? Or maybe this was never
> a problem to you?
>
> Fell free to criticize my naive.
>
> Any advice will be highly appreciate.
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/Discussion-Did-you-ever-forget-to-un-ref-any-GObject-tp4670103.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150105/d399b002/attachment.html>


More information about the gstreamer-devel mailing list