.\" 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 "HASHKIT_FREE" "3" "Feb 01, 2024" "1.1" "libmemcached-awesome" .SH NAME hashkit_free \- libhashkit Documentation .SH SYNOPSIS .INDENT 0.0 .TP .B #include Compile and link with \-lhashkit .UNINDENT .INDENT 0.0 .TP .B typedef struct \fI\%hashkit_st\fP hashkit_st .UNINDENT .INDENT 0.0 .TP .B \fI\%hashkit_st\fP *hashkit_create(\fI\%hashkit_st\fP *hash) .INDENT 7.0 .TP .B Parameters \fBhash\fP \-\- memory address of a \fI\%hashkit_st\fP struct; if a nullptr is passed, the struct will be dynamically allocated by libhashkit .TP .B Returns pointer to initialized \fI\%hashkit_st\fP structure .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fI\%hashkit_st\fP *hashkit_clone(\fI\%hashkit_st\fP *destination, const \fI\%hashkit_st\fP *ptr) .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBdestination\fP \-\- memory address of a \fI\%hashkit_st\fP struct; if a nullptr is passed, the struct will be dynamically allocated by libhashkit .IP \(bu 2 \fBptr\fP \-\- pointer of the \fI\%hashkit_st\fP struct to copy .UNINDENT .TP .B Returns pointer to a \fI\%hashkit_st\fP structure (\fI\%destination\fP, if not nullptr), initialized from \fI\%ptr\fP .UNINDENT .UNINDENT .INDENT 0.0 .TP .B void hashkit_free(\fI\%hashkit_st\fP *hash) .INDENT 7.0 .TP .B Parameters \fBhash\fP \-\- pointer to an initialized \fI\%hashkit_st\fP struct .UNINDENT .UNINDENT .INDENT 0.0 .TP .B bool hashkit_is_allocated(const \fI\%hashkit_st\fP *hash) .INDENT 7.0 .TP .B Parameters \fBhash\fP \-\- pointer to an initialized \fI\%hashkit_st\fP struct .TP .B Returns bool, whether the \fI\%hash\fP struct was dynamically allocated .UNINDENT .UNINDENT .SH DESCRIPTION .sp The \fI\%hashkit_create()\fP function initializes a hashkit object for use. If you pass a nullptr argument for hash, then the memory for the object is allocated. If you specify a pre\-allocated piece of memory, that is initialized for use. .sp The \fI\%hashkit_clone()\fP function initializes a hashkit object much like \fI\%hashkit_create()\fP, but instead of using default settings it will use the settings of the ptr hashkit object. .sp The \fI\%hashkit_free()\fP frees any resources being consumed by the hashkit objects that were initialized with \fI\%hashkit_create()\fP or \fI\%hashkit_clone()\fP\&. .sp The \fI\%hashkit_is_allocated()\fP reports whether the memory was allocated for a hashkit object. .SH RETURN VALUE .sp \fI\%hashkit_create()\fP and \fI\%hashkit_clone()\fP will return nullptr on failure or pointer to \fI\%hashkit_st\fP on success. .sp \fI\%hashkit_is_allocated()\fP returns true if the memory for the hashkit object was allocated inside of \fI\%hashkit_create()\fP or \fI\%hashkit_clone()\fP, otherwise it is false and was user\-supplied memory. .SH SEE ALSO .sp \fBlibhashkit(3)\fP \fBhashkit_value(3)\fP \fBhashkit_function3)\fP .\" Generated by docutils manpage writer. .