[pulseaudio-discuss] [Vala] Issues will vala and pulse vapi
Aaron Paden
aaronbpaden at gmail.com
Sat Nov 21 20:45:54 PST 2015
On Sat, Nov 21, 2015 at 9:54 PM, Evan Nemerson <evan at coeus-group.com> wrote:
>
> That's not quite right; the VAPI shouldn't indicate that a *type* is
> "unmanaged"… it's up to your code to indicate whether an instance is
> unowned. However, the question is really what the proper way to
> destroy an instance is.
>
> In order to determine how to destroy a struct which doesn't specify a
> destroy_function CCode attribute, Vala will look at the members. If
> none of the members require destroy or free functions, then Vala can
> assume that simply releasing the memory associated with the struct
> itself (i.e., calling g_free on heap-allocated instances, or simply
> allowing stack-allocated instances to go out of scope) is sufficient.
Hum. Sourceinfo (and SinkInfo) should not be freed at all, the C APIs
that retrieve them give you const pointers.
More information about the pulseaudio-discuss
mailing list