It is best to make Factory class that support caching item efficiently. Leaving all the work to the developer is not the best here, and it could indeed benefit from a general helper Factory class to make that work easier.
- Differential Revisions
- D7523: eo: add a test to enforce the upper limit of our base object size.
D7445: elementary: enable caching for Efl.Ui.LayoutFactory.
D7444: elementary: enable caching for Efl.Ui.ImageFactory.
D7443: elementary: add a factory that handle caching for you.
D7442: efl: add a factory Eina_Error and rename the file to be more on point with its purpose.
D7441: eo: add the ability to get the size of object of a certain class.
D7440: eo: provider find actually is just accepting Efl.Class, maybe an hystoric left over.
I believe the CachingFactory will provide a function to set the cost limit in number of item and memory usage if the item provide the proper interface for it. It will then implement a InstanceGet() that will create an item if necessary or recycle one given by a call to Release(). It should be pretty straight forward hopfully.