>
>
> Your OrderedMap should itself be implicitly shared and clone the linked
> list
> on detach.
>

Right now, I'm detaching the linked list during copy-construction (and
assignment). Detaching here means re-populating the LL with same entries
and then storing the new LL iterator's in the hash.

For implicit sharing, I'll have to this instead when a non-const function
is called for the first time on the copy. This will cause a penalty when
calling such a function as the hash has to be repopulated with all entries
(eg: calling remove on the copy will take linear time instead of constant,
although subsequent calls will have no penalty). Still thinking about it.

Thanks for your input.

-mandeep



>         Kevin Kofler
>
> _______________________________________________
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to