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


Small macro that simplify references counting.  


\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Refcount_gaf38d0c3392258429d9634dbea7c51648}\label{group__Eina__Refcount_gaf38d0c3392258429d9634dbea7c51648}} 
\#define {\bfseries EINA\+\_\+\+REFCOUNT}~\mbox{\hyperlink{group__Eina__Refcount_gaa357f5cce40409c2fca598508d5f3703}{Eina\+\_\+\+Refcount}} \+\_\+\+\_\+refcount
\begin{DoxyCompactList}\small\item\em Used for declaring a reference counting member in a struct. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Refcount_gae7cbb849fe94000305dd344b98344a95}\label{group__Eina__Refcount_gae7cbb849fe94000305dd344b98344a95}} 
\#define {\bfseries EINA\+\_\+\+REFCOUNT\+\_\+\+INIT}(Variable)~(Variable)-\/$>$\+\_\+\+\_\+refcount = 1
\begin{DoxyCompactList}\small\item\em Used just after allocating a object. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Refcount_ga1303550c19416335a5e4d012f3f5ded0}\label{group__Eina__Refcount_ga1303550c19416335a5e4d012f3f5ded0}} 
\#define {\bfseries EINA\+\_\+\+REFCOUNT\+\_\+\+REF}(Variable)~(Variable)-\/$>$\+\_\+\+\_\+refcount++
\begin{DoxyCompactList}\small\item\em Used when using referring to an object one more time. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Refcount_ga85c005aaee53141665fb5ea88e10f5e0}{EINA\+\_\+\+REFCOUNT\+\_\+\+UNREF}}(Variable)~  if (-\/-\/((Variable)-\/$>$\+\_\+\+\_\+refcount) == 0)
\begin{DoxyCompactList}\small\item\em Used when removing a reference to an object. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Refcount_ga3987f48cd01a1c3d17f6b59d65d22a33}\label{group__Eina__Refcount_ga3987f48cd01a1c3d17f6b59d65d22a33}} 
\#define {\bfseries EINA\+\_\+\+REFCOUNT\+\_\+\+GET}(Variable)~(Variable)-\/$>$\+\_\+\+\_\+refcount
\begin{DoxyCompactList}\small\item\em Get refcounting value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Refcount_gaa357f5cce40409c2fca598508d5f3703}\label{group__Eina__Refcount_gaa357f5cce40409c2fca598508d5f3703}} 
typedef int {\bfseries Eina\+\_\+\+Refcount}
\begin{DoxyCompactList}\small\item\em Inlined references counting type. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{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 ! 

\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__Refcount_ga85c005aaee53141665fb5ea88e10f5e0}\label{group__Eina__Refcount_ga85c005aaee53141665fb5ea88e10f5e0}} 
\index{References counting@{References counting}!EINA\_REFCOUNT\_UNREF@{EINA\_REFCOUNT\_UNREF}}
\index{EINA\_REFCOUNT\_UNREF@{EINA\_REFCOUNT\_UNREF}!References counting@{References counting}}
\doxysubsubsection{\texorpdfstring{EINA\_REFCOUNT\_UNREF}{EINA\_REFCOUNT\_UNREF}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+REFCOUNT\+\_\+\+UNREF(\begin{DoxyParamCaption}\item[{}]{Variable }\end{DoxyParamCaption})~  if (-\/-\/((Variable)-\/$>$\+\_\+\+\_\+refcount) == 0)}



Used when removing a reference to an object. 

The code just after will automatically be called when necessary 