void vortex_ctx_unref2 ( VortexCtx **  ctx,
const char *  who 

Decrease reference count and nullify caller's pointer in the case the count reaches 0.

ctxThe context to decrement reference count. In the case 0 is reached the VortexCtx instance is deallocated and the callers reference is nullified.
whoAn string that identifies this ref. Useful for debuging.

References vortex_ctx_free2(), vortex_mutex_lock(), and vortex_mutex_unlock().

Referenced by vortex_connection_free(), vortex_ctx_unref(), and vortex_frame_free().