Re: uuid of newly created domain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mar 31, 2008, at 16:28, Daniel P. Berrange wrote:
The problem is that you are not freeing the virDomainPtr object
after you undefine the first VM. Libvirt caches virDomainPtr objects
based on the 'name' value. So the second time around you are getting
the cached handle. You are also leaking memory.

You need to call

 virDomainFree(virDomainPtr dom)

to actually release the handle.


Thanks for the explanation. I will try this in my code.

However, I think this behavior is counter-intuitive. I was expecting that undefining domain should remove it from cache, or creating new domain with same name should replace
old definition with a new one.

Sincerely,
Vadim


--
"La perfection est atteinte non quand il ne reste rien a ajouter, mais
quand il ne reste rien a enlever."  (Antoine de Saint-Exupery)


Attachment: smime.p7s
Description: S/MIME cryptographic signature

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]