[Vortex] Some vortex questions
Francis Brosnan Blazquez
francis at aspl.es
Fri Apr 18 18:00:22 CEST 2008
> Hello,
Hi Benoit,
> I have some questions about vortex as I'm not completely sure about
> my
> 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
> reply.
> Should I call vortex_connection_unref after
> vortex_connection_shutdown
> 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.
vortex_connection_shutdown (connection);
// now close the connection (decreases the reference counting, that is
// the one assignated by vortex_connection_new) and terminates resources
// associated.
vortex_connection_close (connection);
// 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
> the
> VortexFrame* returned by vortex_channel_wait_reply ? The
> documentation
> 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,
> it's
> 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!
> Thanks,
> Benoît AMIAUX
--
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.
More information about the Vortex
mailing list