[Vortex] Some vortex questions
Francis Brosnan Blazquez
francis at aspl.es
Fri Apr 18 18:00:22 CEST 2008
> I have some questions about vortex as I'm not completely sure about
> interpretation of the documentation.
I've reviewed vortex_connection_shutdown and it is confusing. I've
updated it explaining how it interacts with vortex_connection_close.
> 1) When using vortex_connection_new(...), after a while, I'd like to
> shut down the connection without waiting for the remote peer to
> Should I call vortex_connection_unref after
> because vortex_connection_new gives me one ref on the connection ?
At this moment is equivalent though the right sequence is (taken from
updated documentation of vortex_connection_shutdown):
Example 1: Closing a connection at the client side:
// Call to terminate the connection right now. No reference counting
// is updated.
// now close the connection (decreases the reference counting, that is
// the one assignated by vortex_connection_new) and terminates resources
// NOTE: a call to vortex_connection_close, after vortex_connection_shutdow
// never fails.
> 2) Is it correct to do vortex_frame_unref after I'm finished using
> VortexFrame* returned by vortex_channel_wait_reply ? The
> example does not but I got memleaks doing the same.
Yes it is right. I've updated vortex_channel_wait_reply to clearly state
that the caller must do a call to vortex_frame_unref when he is done
with frame reference returned.
> Generally, whenever some vortex or axl function returns a pointer,
> not always clear whether we just have to drop it, unref it or free it
> after use.
An axl/vortex function documentation that do not reports how to
terminate a reference returned (or not because it is internal) it is
definitely a bug. Please report them as is.
Thanks for reporting Benoit!
> Benoît AMIAUX
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.
More information about the Vortex