[Libvir] patch: Domain.free() in Ruby bindings

Attached patch adds new method free() to Domain class. Invocation of this method calls virDomainFree(). After this call, all other calls to this domain object would fail. The purpose of this patch is to solve problem caused by libvirt caching, when creation of new domain from XML is re-using previous definition with the same name, if domain object associated with older definition have not been yet freed by Ruby garbage collector (see previous discussion in this mailing list for details). Sincerely, Vadim Zaliva P.S. I think Python bindings will need similar method as well. P.P.S. I have tested this patch, and I can see that it solves the problem I was facing.

On Tue, 2008-04-01 at 10:04 -0700, Vadim Zaliva wrote:
Attached patch adds new method free() to Domain class. Invocation of this method calls virDomainFree(). After this call, all other calls to this domain object would fail.
Thanks for the patch. I just committed a slight variation of the patch - for symmetry, I added free methods for Network, StorageVol and StoragePool, too. David
participants (2)
-
David Lutterkort
-
Vadim Zaliva