From 44e549e812e8f309e3a15c9725926bc3e4487e69 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 23 Apr 2012 11:51:49 +0000 Subject: [PATCH] Eobj: added warnings to eobj_ref's docs. SVN revision: 70416 --- legacy/eobj/lib/Eobj.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/legacy/eobj/lib/Eobj.h b/legacy/eobj/lib/Eobj.h index d8a508cb0d..224d6cf8e3 100644 --- a/legacy/eobj/lib/Eobj.h +++ b/legacy/eobj/lib/Eobj.h @@ -463,6 +463,13 @@ EAPI void *eobj_data_get(const Eobj *obj, const Eobj_Class *klass); * @param obj the object to work on. * @return The object passed. * + * It's very easy to get a refcount leak and start leaking memory because + * of a forgotten unref or an extra ref. That is why there are eobj_xref + * and eobj_xunref that will make debugging easier in such a case. + * Therefor, these functions should only be used in small scopes, i.e at the + * start of some section in which the object may get freed, or if you know + * what you are doing. + * * @see eobj_unref() * @see eobj_ref_get() */