On Thu, May 17, 2012 at 4:51 PM, Bluezery <ohpo...@gmail.com> wrote:
> Dear EFL developers,
>
> I have questions about initialization/unintialization functions in EFL
> such as elm_init(), ecore_init(), elm_shutdown(), etc.
> Those functions have interval static counter variables such as
> _ecore_init_count.
> And If xxx_init() is called, a counter variable increases by 1 and if
> xxx_shutdown() is called, it decreases.
> However, I think that those confuse users (application developers) somewhat.
>
> For example, if ecore_shutdown() is called twice and ecore_init() is
> called once after that, nothing is initialized.
> Because after _ecore_init_count variable become 1, ecore_init() do
> evil_init() or eina_init(), etc.
> It seems that ecore_init() should be called 3 times after
> ecore_shutdown() is called twice. All other xxx_init, xxx_shutdown()
> pairs in EFL do same behavior.
> IMHO, After ecore_shutdown() is called many times,  calling
> ecore_init() once should do initialization.
> Of course, If ecore_init() is called 10 times,  ecore_shutdown()
> should do unintialization at the moment ecore_shutdown() is called 11
> time.
>
> Also return value is somewhat confusing. In documentation of
> ecore_init() and ecore_shutdown(), It succeed if return value is 1 and
> it fail if it is 0.
> But it returns static counter variable. This may need documentation
> modification in ecore. And other xxx_init() and xxx_shutdown() are
> better to have same pattern.
>

It's up to te user to call once the _init function at the beginning of
the program and the _shutdown() function at the end of the program.
Any other use is not our problem. The counter is there for indirect
calls of the init/sutdown functions (like ecore_evas_init that calls
ecore_init and evas_init for example)

Vincent

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to