[libvirt] [PATCH C#] Always close connections and free domains

Daniel Veillard veillard at redhat.com
Thu Oct 28 19:30:04 UTC 2010


On Thu, Oct 28, 2010 at 12:37:18PM +0200, Matthias Bolte wrote:
> Also free the unmanaged authDataPtr in the virConnectOpenAuth
> examples.

  I'm no C# expert by all mean ... so I'm not sure I should comment

[...]
>                      }
>                      string domainName = Domain.GetName(domainPtr);
> +                    Domain.Free(domainPtr);

  but that I wonder ... When people are used to GC'ed languages, they
hate when they have to do the cleanup themselve and end up with leaks
left and right (from experience with libxml2 python bindings...)
  Is there really no way to do some kind of automatic garbage collection
of Domain objects, or is adding this just a way to speed up the GC in
a loop ?

  otherwise patch looks 'normal' to my unexercized eye :-)

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list