\doxysection{comps\+\_\+mm.\+h File Reference}
\hypertarget{comps__mm_8h}{}\label{comps__mm_8h}\index{comps\_mm.h@{comps\_mm.h}}


COMPS memory management(reference counter) file.  


{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$signal.\+h$>$}\newline
\doxysubsubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structCOMPS__RefC}{COMPS\+\_\+\+RefC}}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structCOMPS__RefC}{COMPS\+\_\+\+RefC}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{comps__mm_8h_a19b81957c8e2d3f6a6d35aefba4496f8}{comps\+\_\+refc\+\_\+create}} (void \texorpdfstring{$\ast$}{*}obj, void(\texorpdfstring{$\ast$}{*}destructor)(void \texorpdfstring{$\ast$}{*}))
\item 
void \mbox{\hyperlink{comps__mm_8h_a0cedddf13e90bfade88c7728513e7211}{comps\+\_\+refc\+\_\+destroy}} (\mbox{\hyperlink{structCOMPS__RefC}{COMPS\+\_\+\+RefC}} \texorpdfstring{$\ast$}{*}refc)
\item 
void \mbox{\hyperlink{comps__mm_8h_a26ada6e95aa4a75d3b8b5a468d1ea7e5}{comps\+\_\+refc\+\_\+destroy\+\_\+v}} (void \texorpdfstring{$\ast$}{*}refc)
\item 
void \mbox{\hyperlink{comps__mm_8h_ae903e31746c19cf12c8042107c5727e5}{comps\+\_\+refc\+\_\+decref}} (\mbox{\hyperlink{structCOMPS__RefC}{COMPS\+\_\+\+RefC}} \texorpdfstring{$\ast$}{*}refc)
\item 
void \mbox{\hyperlink{comps__mm_8h_aadcaaac04bffb81cf6204a5aa3a8de3f}{comps\+\_\+refc\+\_\+incref}} (\mbox{\hyperlink{structCOMPS__RefC}{COMPS\+\_\+\+RefC}} \texorpdfstring{$\ast$}{*}refc)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
COMPS memory management(reference counter) file. 

Details. 

\label{doc-func-members}
\Hypertarget{comps__mm_8h_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{comps__mm_8h_a19b81957c8e2d3f6a6d35aefba4496f8}\index{comps\_mm.h@{comps\_mm.h}!comps\_refc\_create@{comps\_refc\_create}}
\index{comps\_refc\_create@{comps\_refc\_create}!comps\_mm.h@{comps\_mm.h}}
\doxysubsubsection{\texorpdfstring{comps\_refc\_create()}{comps\_refc\_create()}}
{\footnotesize\ttfamily \label{comps__mm_8h_a19b81957c8e2d3f6a6d35aefba4496f8} 
\mbox{\hyperlink{structCOMPS__RefC}{COMPS\+\_\+\+RefC}} \texorpdfstring{$\ast$}{*} comps\+\_\+refc\+\_\+create (\begin{DoxyParamCaption}\item[{void \texorpdfstring{$\ast$}{*}}]{obj}{, }\item[{void(\texorpdfstring{$\ast$}{*}}]{destructor~}{)(void \texorpdfstring{$\ast$}{*})}\end{DoxyParamCaption})}

reference counter constructor \Hypertarget{comps__mm_8h_ae903e31746c19cf12c8042107c5727e5}\index{comps\_mm.h@{comps\_mm.h}!comps\_refc\_decref@{comps\_refc\_decref}}
\index{comps\_refc\_decref@{comps\_refc\_decref}!comps\_mm.h@{comps\_mm.h}}
\doxysubsubsection{\texorpdfstring{comps\_refc\_decref()}{comps\_refc\_decref()}}
{\footnotesize\ttfamily \label{comps__mm_8h_ae903e31746c19cf12c8042107c5727e5} 
void comps\+\_\+refc\+\_\+decref (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structCOMPS__RefC}{COMPS\+\_\+\+RefC}} \texorpdfstring{$\ast$}{*}}]{refc}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

alias for comps\+\_\+refc\+\_\+destroy \begin{DoxySeeAlso}{See also}
\doxylink{comps__mm_8h_a0cedddf13e90bfade88c7728513e7211}{comps\+\_\+refc\+\_\+destroy} 
\end{DoxySeeAlso}
\Hypertarget{comps__mm_8h_a0cedddf13e90bfade88c7728513e7211}\index{comps\_mm.h@{comps\_mm.h}!comps\_refc\_destroy@{comps\_refc\_destroy}}
\index{comps\_refc\_destroy@{comps\_refc\_destroy}!comps\_mm.h@{comps\_mm.h}}
\doxysubsubsection{\texorpdfstring{comps\_refc\_destroy()}{comps\_refc\_destroy()}}
{\footnotesize\ttfamily \label{comps__mm_8h_a0cedddf13e90bfade88c7728513e7211} 
void comps\+\_\+refc\+\_\+destroy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structCOMPS__RefC}{COMPS\+\_\+\+RefC}} \texorpdfstring{$\ast$}{*}}]{refc}{}\end{DoxyParamCaption})}

if ref counter equals zero destroy holded object and ref counter object itself, otherwise decrement counter \begin{DoxySeeAlso}{See also}
\doxylink{comps__mm_8h_ae903e31746c19cf12c8042107c5727e5}{comps\+\_\+refc\+\_\+decref} 
\end{DoxySeeAlso}
\Hypertarget{comps__mm_8h_a26ada6e95aa4a75d3b8b5a468d1ea7e5}\index{comps\_mm.h@{comps\_mm.h}!comps\_refc\_destroy\_v@{comps\_refc\_destroy\_v}}
\index{comps\_refc\_destroy\_v@{comps\_refc\_destroy\_v}!comps\_mm.h@{comps\_mm.h}}
\doxysubsubsection{\texorpdfstring{comps\_refc\_destroy\_v()}{comps\_refc\_destroy\_v()}}
{\footnotesize\ttfamily \label{comps__mm_8h_a26ada6e95aa4a75d3b8b5a468d1ea7e5} 
void comps\+\_\+refc\+\_\+destroy\+\_\+v (\begin{DoxyParamCaption}\item[{void \texorpdfstring{$\ast$}{*}}]{refc}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

alias with void argument \begin{DoxySeeAlso}{See also}
\doxylink{comps__mm_8h_a0cedddf13e90bfade88c7728513e7211}{comps\+\_\+refc\+\_\+destroy} 
\end{DoxySeeAlso}
\Hypertarget{comps__mm_8h_aadcaaac04bffb81cf6204a5aa3a8de3f}\index{comps\_mm.h@{comps\_mm.h}!comps\_refc\_incref@{comps\_refc\_incref}}
\index{comps\_refc\_incref@{comps\_refc\_incref}!comps\_mm.h@{comps\_mm.h}}
\doxysubsubsection{\texorpdfstring{comps\_refc\_incref()}{comps\_refc\_incref()}}
{\footnotesize\ttfamily \label{comps__mm_8h_aadcaaac04bffb81cf6204a5aa3a8de3f} 
void comps\+\_\+refc\+\_\+incref (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structCOMPS__RefC}{COMPS\+\_\+\+RefC}} \texorpdfstring{$\ast$}{*}}]{refc}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

increment reference counter by 1 