You are not logged in.
Hi Arnaud,
there is an issue with TJSONSerializer.RegisterObjArrayForJSON. It looks like if there is a limitation to RegisterObjArrayForJSON. When adding the 126th T*ObjArray<->T* pair, all T*ObjArray params start leaking memory on server side. My last post in http://synopse.info/forum/viewtopic.php?id=3559 describes what is happening then.
I've attached a demo program to reproduce the issue, you can download from: http://www.megafileupload.com/g1ez/MemLeakTest.zip
Compile and run the program, everything works as expected.
Enable conditional define {$DEFINE SHOWBUG} and .GetAll(TTestObjArray) leaks memory. 1000 instances of TTest are not destroyed, because TJSONSerrializer is broken.
It took me some time to find out what's happening here, i hope my test helps.
Kind regards,
oz.
Offline
I've created a ticket for this issue http://synopse.info/fossil/tktview/954f … 2786231833 . Demo code is attached in ticket description and can be copy&pasted to an empty .dpr file.
Arnaud, did you have time to run the demo? It's quite a serious low level issue i guess...
Last edited by oz (2016-10-05 10:16:16)
Offline
I think I've found the root causes.
See http://synopse.info/fossil/info/5e9bb92e87
Thanks to your demo program, I was able to make the fix.
Thanks a lot!
Offline
You're welcome, i'm happy my demo program did help!
I just did some tests, the issue is gone, thanks.
Offline