Can someone explain me why you are using the data field to store the IModel?

Memory optimization.

when we look at all the access to the get method we can see that it excludes 
always
the first element if the model is set.

If the model is set, Components knows it to be at index 0:

                if (getFlag(FLAG_MODEL_SET))
                {
                        return (IModel<?>)data_get(0);
                }
                return null;

Doesn't look like the first element is excluded, does it?

Sven


On 10/21/2012 12:19 PM, Nuno Pedro Jacinto wrote:
Good afternoon,

Can someone explain me why you are using the data field to store the IModel?
I saw the comment on the model flag concerning the possibility of a model 
implementing also the Behaviour interface, what makes sense, but when we look 
at all the access to the get method we can see that it excludes always the 
first element if the model is set.
I image that you have more important things to do, but I was wondering if I am 
missing something.

Thank you.

Cheers,
Nuno Jacinto


Reply via email to