On 03/08/10 13:16, Gianni Tedesco (3P) wrote:
I actually prefer explicit free's on the returned objects. That gives
callers a lot more control. Have you seen Ians patch auto-generating
that code? I think this approach combined with automatic-freeing of
scratch data used in libxl calls is the best of both worlds.
How much control do you actually need ?
In python you'ld have the approach:
in OCaml exactly the same.
how is that an improvement for python and ocaml bindings that you have
to insert the right call in some functions to do some more freeing ?
It also save having to generate freeing code.
I don't know about ocaml but assume it's trivial to call a libxl_*_free
function when an object which encapsulates a libxl returned object is
it's possible and not very hard, it doesn't mean that should be done though.
I really like the braindead approch of after i called libxl_ctx_free, i
don't have anything to do with memory by design. You're advocating for
having to put the right call in the right functions in the place that
Xen-devel mailing list