[fpc-devel] THashMap or similar with ansistring as key
Sven Barth
pascaldragon at googlemail.com
Sat Nov 9 17:33:01 CET 2024
Am 09.11.2024 um 17:19 schrieb Martin Frb via fpc-devel:
> Google didn't deliver an answer...
>
> If I do
> specialize TDictionary<AnsiString, TMyData>
> specialize T{Fast}HashMap<AnsiString, TMyData>
>
> will it actually has the string content? Or is the string the address
> in the string variable => and therefore 2 strings with the same text
> can be different?
They should all has the string content.
>
> And if the latter, how do I get the former?
> (generics, or any other place that has such a map)
You could go up the inheritance chain where a THashFactory descendant is
passed in as a parameter one of the parent generic classes and instead
pass in a different factory that does what you need. Absolutly not
tested, but *should* work.
Regards,
Sven
More information about the fpc-devel
mailing list