<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 

<refentry id="free_message"> <!-- ID for references -->

<refentrytitle>free_message</refentrytitle> <!-- title shown in references -->
<manvolnum>3</manvolnum></refmeta> <!-- man volume id (3 for libraries) -->

<refname>free_message</refname> <!-- function name -->
<refpurpose>free message</refpurpose> <!-- short function description -->

#include &lt;cds/msg_queue.h&gt; <!-- included headers -->

<funcprototype> <!-- function prototype -->
  <funcdef>void <function>free_message</function></funcdef>
  <paramdef>mq_message_t *<parameter>msg</parameter></paramdef>


<para>Frees message. If data is allocated explicitly it frees it using
if they are allocated implicitly, it is freed together with message. Thus simple
data strutures are deallocated automaticaly in both cases. There might be a
problem with more complicated structures with internal pointers to other
structures - for these you can set destroy function using
<!-- detailed description -->


<refsect1><title>See Also</title>
<xref linkend="create_message"/>, <xref linkend="create_message_ex"/>, <xref
linkend="init_message_ex"/>, <xref linkend="set_data_destroy_function"/>
<!-- references to other pages -->