projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1754ca9
)
Eo: Added a phantom ref if we manual free.
author
Tom Hacohen
<tom@stosb.com>
Wed, 6 Jun 2012 11:41:53 +0000
(11:41 +0000)
committer
Tom Hacohen
<tom@stosb.com>
Wed, 6 Jun 2012 11:41:53 +0000
(11:41 +0000)
This lets us use eo_do and the such on deleted to be manually freed objects.
SVN revision: 71746
legacy/eobj/lib/eo.c
patch
|
blob
|
history
diff --git
a/legacy/eobj/lib/eo.c
b/legacy/eobj/lib/eo.c
index
c9ab366
..
1edd486
100644
(file)
--- a/
legacy/eobj/lib/eo.c
+++ b/
legacy/eobj/lib/eo.c
@@
-1291,7
+1291,10
@@
_eo_unref(Eo *obj)
}
#endif
- if (!obj->manual_free) _eo_free(obj);
+ if (!obj->manual_free)
+ _eo_free(obj);
+ else
+ _eo_ref(obj); /* If we manual free, we keep a phantom ref. */
}
}
@@
-1580,7
+1583,7
@@
eo_manual_free(Eo *obj)
return;
}
- if (
0 != obj->refcount
)
+ if (
!obj->del
)
{
ERR("Tried deleting the object %p while still referenced(%d).", obj, eo_ref_get(obj));
return;