[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] [PATCH] Domain Events Python Bindings
- From: Ben Guthro <bguthro virtualiron com>
- To: veillard redhat com
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] [PATCH] Domain Events Python Bindings
- Date: Wed, 29 Oct 2008 13:45:57 -0400
Daniel Veillard wrote on 10/29/2008 01:09 PM:
>> + /* Call the Callback Dispatcher */
>> + pyobj_ret = PyObject_CallMethod(pyobj_conn_inst,
>> + (char*)"dispatchDomainEventCallbacks",
>> + (char*)"Oi",
>> + pyobj_dom_inst,
>> + event);
>> +
>> + Py_DECREF(pyobj_dom_inst);
>> + Py_DECREF(pyobj_conn_inst);
>
> We should make clear that the python callback can't keep any reference
> to the domain.
> Maybe the solution is to pass a name or UUID string and let the python
> user do the lookup, might also avoid the object duplication (but then
> the user will do the dictionary of domains and get into the same
> problems of object lifetime).... I hate asynch interfaces :-)
>
If the callback keeps a reference, then python will reference count it, and this will not get garbage collected until it gives up the last reference... am I misunderstanding something?
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]