[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-avahi
Subject:    Re: [avahi] Do I need to do the avahi_service_resolver_free
From:       Lennart Poettering <lennart () poettering ! net>
Date:       2007-12-20 10:45:36
Message-ID: 20071220104536.GB16703 () tango ! 0pointer ! de
[Download RAW message or body]

On Thu, 20.12.07 09:06, Arhold (arhold@gmail.com) wrote:

> Hi Lennart,

Hi!

> Thanks for your reply. It's very helpful.
> 
> I think our case belongs to the exceptions where the constant monitoring is
> neccessory. So we will need to keep AvahiServiceResolver around.
> 
> My further question is, when will the AvahiServiceResolver be free. Do I
> need to release the resolver somewhere in my application or  avahi itself
> will manage those resolvers?

We don't do automatic memory management, this is not Java or Python or
anything ;-)

You should always free your own resources, however the final
avahi_client_free() will also free all attached objects, like
browsers, resolvers, entry groups. Freeing the client will do the big
clean up. OTOH this means that you are not supposed to use any of the
attached objects after calling avahi_client_free()!

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
avahi mailing list
avahi@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/avahi
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic