You are not logged in.
Pages: 1
dict := TSynDictionary.New<RawUTF8, RawUTF8>(true);
dict.Capacity := 64;
dict.free;
These simple code will cause a GPF error at
VarClearProc(Padding[i].Data)
with i = DIC_KEY.
Offline
This is a very weird behavior of the VarClearProc() function of the RTL.
Should be fixed by https://github.com/synopse/mORMot2/commit/63b482bf
I have added the corresponding regression tests.
https://github.com/synopse/mORMot2/commit/27cb3d5e
Offline
It works. :-)
Offline
In fact, the VarClearProc() behavior was not weird nor buggy: it was expected.
We should not use varUnknown as variant type, unless we actually store a true IInterface/IUnknown within the variant.
I have made a code review to fix this in our units.
Offline
Pages: 1