On Wed, Jan 23, 2013 at 1:08 PM, Guillaume Friloux
<guillaume.fril...@asp64.com> wrote:
> I considered maybe too quickly that for strings it was working exactly like
> blobs.
> Which made me thinks that we were directly having a pointer to the string
> data from sqlite3 that was invalid while not yet freed, as sqlite3 only
> directly frees blobs.
>
> So the part for string is indeed unecessary considering your comments.
>
>
> Regarding the blob part, you say that we shouldnt flush the blob 3 times,
> and this makes me wonder if i understand you clearly :
> Does it imply that which have to flush every eina_value except the ones that
> are blobs ?

eina_value is pretty simple, there is no refcount or automatic garbage
collector. The rule is simple: if you eina_value_setup(), you
eina_value_ lush(). If you eina_value_ ew(), you eina_value_ ree()
(eina_value_new = malloc + eina_value_setup, eina_value_free =
eina_value_flush + free)

Just imagine you're doing a malloc + free. You must do exactly one pair.

If user wants to keep an reference, he must use eina_value_copy().
Then he must eina_value_flush() that copy as well.

--
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to