You are not logged in.
Pages: 1
Arnaud, if I declare a type to be used as a dictionary key in TSynDictionary:
TMyKey = record
A, B: Double;
end;
TMyKeyDynArray = array of TMyKey;
and initialize a TSynDictionary instance as
D := TSynDictionary.Create(TypeInfo(TMyKeyDynArray), TypeInfo(TItensArray));
in a loop, we add itens to dictionary:
K.A := SomeFuncionA;
K.B := SomeFuncionB;
if D.Exists(K) then { do something }
else D.Add(K, SomeItem);
In the second pass of loop, I get a AV when call D.Exists().
Works when I change the key type to be a RawUTF8 or a variant.
This is by design?
Last edited by Junior/RO (2017-03-11 16:28:18)
Offline
Pages: 1