\hypertarget{group__Eina__Refcount}{\section{References counting}
\label{group__Eina__Refcount}\index{References counting@{References counting}}
}


Small macro that simplify references counting.  


\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Refcount_gaf38d0c3392258429d9634dbea7c51648}{\#define \hyperlink{group__Eina__Refcount_gaf38d0c3392258429d9634dbea7c51648}{E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T}~\hyperlink{group__Eina__Refcount_gaa357f5cce40409c2fca598508d5f3703}{Eina\+\_\+\+Refcount} \+\_\+\+\_\+refcount}\label{group__Eina__Refcount_gaf38d0c3392258429d9634dbea7c51648}

\begin{DoxyCompactList}\small\item\em Used for declaring a reference counting member in a struct. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Refcount_gae7cbb849fe94000305dd344b98344a95}{\#define \hyperlink{group__Eina__Refcount_gae7cbb849fe94000305dd344b98344a95}{E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+I\+N\+I\+T}(Variable)~(Variable)-\/$>$\+\_\+\+\_\+refcount = 1}\label{group__Eina__Refcount_gae7cbb849fe94000305dd344b98344a95}

\begin{DoxyCompactList}\small\item\em Used just after allocating a object. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Refcount_ga1303550c19416335a5e4d012f3f5ded0}{\#define \hyperlink{group__Eina__Refcount_ga1303550c19416335a5e4d012f3f5ded0}{E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+R\+E\+F}(Variable)~(Variable)-\/$>$\+\_\+\+\_\+refcount++}\label{group__Eina__Refcount_ga1303550c19416335a5e4d012f3f5ded0}

\begin{DoxyCompactList}\small\item\em Used when using referring to an object one more time. \end{DoxyCompactList}\item 
\#define \hyperlink{group__Eina__Refcount_ga85c005aaee53141665fb5ea88e10f5e0}{E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+U\+N\+R\+E\+F}(Variable)~if (-\/-\/((Variable)-\/$>$\+\_\+\+\_\+refcount) == 0)
\begin{DoxyCompactList}\small\item\em Used when removing a reference to an object. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Refcount_ga3987f48cd01a1c3d17f6b59d65d22a33}{\#define \hyperlink{group__Eina__Refcount_ga3987f48cd01a1c3d17f6b59d65d22a33}{E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+G\+E\+T}(Variable)~(Variable)-\/$>$\+\_\+\+\_\+refcount}\label{group__Eina__Refcount_ga3987f48cd01a1c3d17f6b59d65d22a33}

\begin{DoxyCompactList}\small\item\em Get refcounting value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Refcount_gaa357f5cce40409c2fca598508d5f3703}{typedef int \hyperlink{group__Eina__Refcount_gaa357f5cce40409c2fca598508d5f3703}{Eina\+\_\+\+Refcount}}\label{group__Eina__Refcount_gaa357f5cce40409c2fca598508d5f3703}

\begin{DoxyCompactList}\small\item\em Inlined references counting type. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Small macro that simplify references counting. 

References counting is not a difficult task, but you must handle it correctly every where, and that the issue. This set of macro do provide helper that will force to use the correct code in most case and reduce the bug likeliness. Of course this without affecting speed ! 

\subsection{Macro Definition Documentation}
\hypertarget{group__Eina__Refcount_ga85c005aaee53141665fb5ea88e10f5e0}{\index{References counting@{References counting}!E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+U\+N\+R\+E\+F@{E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+U\+N\+R\+E\+F}}
\index{E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+U\+N\+R\+E\+F@{E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+U\+N\+R\+E\+F}!References counting@{References counting}}
\subsubsection[{E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+U\+N\+R\+E\+F}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+U\+N\+R\+E\+F(
\begin{DoxyParamCaption}
\item[{}]{Variable}
\end{DoxyParamCaption}
)~if (-\/-\/((Variable)-\/$>$\+\_\+\+\_\+refcount) == 0)}}\label{group__Eina__Refcount_ga85c005aaee53141665fb5ea88e10f5e0}


Used when removing a reference to an object. 

The code just after will automatically be called when necessary 

Referenced by eeze\+\_\+net\+\_\+free(), eio\+\_\+monitor\+\_\+del(), ethumb\+\_\+client\+\_\+disconnect(), and ethumb\+\_\+client\+\_\+thumb\+\_\+exists\+\_\+cancel().

