.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "GEARMAN_CLIENT_FREE" "3" "Jan 31, 2024" "1.1.20+ds" "Gearmand" .SH NAME gearman_client_free \- Gearmand Documentation, http://gearman.info/ .SH SYNOPSIS .sp #include .INDENT 0.0 .TP .B \fI\%gearman_client_st\fP *gearman_client_create(\fI\%gearman_client_st\fP *client) .UNINDENT .INDENT 0.0 .TP .B \fI\%gearman_client_st\fP *gearman_client_clone(\fI\%gearman_client_st\fP *client, const \fI\%gearman_client_st\fP *from) .UNINDENT .INDENT 0.0 .TP .B void gearman_client_free(\fI\%gearman_client_st\fP *client) .UNINDENT .sp Link with \-lgearman .SH DESCRIPTION .sp \fI\%gearman_client_create()\fP is used to create a c:type:\fIgearman_client_st\fP structure that will then be used by other libgearman client functions to communicate with the server. You should either pass a statically declared \fI\%gearman_client_st\fP to \fI\%gearman_client_create()\fP or a NULL. If a NULL passed in then a structure is allocated for you. .sp \fI\%gearman_client_clone()\fP is similar to \fI\%gearman_client_create()\fP but it copies the defaults and list of servers from the source \fI\%gearman_client_st\fP . If you pass a null as the argument for the source to clone, it is the same as a call to gearman_client_create. If the destination argument is NULL a \fI\%gearman_client_st\fP will be allocated for you. .sp To clean up memory associated with a \fI\%gearman_client_st\fP structure you should pass it to gearman_client_free when you are finished using it. \fI\%gearman_client_free()\fP is the only way to make sure all memory is deallocated when you finish using the structure. .sp \fBWARNING:\fP .INDENT 0.0 .INDENT 3.5 You may wish to avoid using \fI\%gearman_client_create()\fP or \fI\%gearman_client_clone()\fP with a stack based allocation, ie the first parameter. The most common issues related to ABI safety involve stack allocated structures. .UNINDENT .UNINDENT .SH RETURN VALUE .sp \fI\%gearman_client_create\fP returns a pointer to the gearman_client_st that was created (or initialized). On an allocation failure, it returns NULL. .sp \fI\%gearman_client_clone\fP returns a pointer to the gearman_client_st that was created (or initialized). On an allocation failure, it returns NULL. .SH HOME .sp To find out more information please check: \fI\%http://gearman.info/\fP .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 \fBgearmand(8)\fP \fBlibgearman(3)\fP \fBgearman_strerror(3)\fP \fBgearman_client_st(3)\fP .UNINDENT .UNINDENT .SH AUTHOR Data Differential http://www.datadifferential.com/ .SH COPYRIGHT 2011-2024, Data Differential, http://www.datadifferential.com/ .\" Generated by docutils manpage writer. .