Eobj: added warnings to eobj_ref's docs.

SVN revision: 70416
This commit is contained in:
Tom Hacohen 2012-04-23 11:51:49 +00:00
parent 5c5fc69bef
commit 44e549e812
1 changed files with 7 additions and 0 deletions

View File

@ -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()
*/