2016-01-28 0:38 GMT+01:00 Sven Barth <pascaldra...@googlemail.com>:

> Why would each collection instance need to contain an instance of the
> comparer? They don't contain state and are reentrant, so they can be easily
> shared with ARC singletons.
>
> Note: there would either need to be a global variable for each instance or
> a list that gets automatically finalized as well (e.g. as a stupid
> implementation an array of IInterface). Then if Generics.Defaults is
> finalized before the other unit using it only the reference count will be
> decreased and only when the other unit is finalized the comparer will be
> destroyed.
>
Yes it can be done in that way, but I want to avoid this (It will
complicate other things). In Generics.Defaults manual interfaces are easier
to maintain. Manual interfaces are more solid construction. They are more
resistant for improper use than regular ARC interfaces. You did not specify
any technical argument to discrediting manual interfaces implementation in
Generics.Defaults. Just a feeling :P. Your only technical argument has been
overthrown.
-- 
Best regards,
Maciej Izak
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to