[fpc-pascal] Using TInterfaceList and casting interfaces
    Benito van der Zander 
    benito at benibela.de
       
    Sun Apr 14 00:35:09 CEST 2019
    
    
  
Hi,
>
>     Or perhaps it is better to use gvector rather than TInterfaceList?
>
>
> If you only store a specific interface type then using one of the 
> generic containers specialized to that type would indeed be best.
>
  and on a closer look TInterfaceList does a lot of locking.
guess TInterfaceList should be avoided, unless you actually need 
something thread-safe. The classes unit is full of weird stuff
Best,
Benito
Am 07.04.19 um 20:24 schrieb Sven Barth via fpc-pascal:
> Benito van der Zander <benito at benibela.de <mailto:benito at benibela.de>> 
> schrieb am So., 7. Apr. 2019, 15:34:
>
>     Writing (list.get(0) as ISomeInterface), is very slow and not
>     possible,
>     when the interface has no GUID.
>
>
> This is indeed what is supposed to be used with TInterfaceList.
>
>     Or perhaps it is better to use gvector rather than TInterfaceList?
>
>
> If you only store a specific interface type then using one of the 
> generic containers specialized to that type would indeed be best.
>
> Regards,
> Sven
>
> _______________________________________________
> fpc-pascal maillist  -fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190414/a902f23f/attachment.html>
    
    
More information about the fpc-pascal
mailing list