Re: Somehow TrySetLength is causing ACCESS VIOLATIONS ?! WHY ?!
Skybuck Flying <[email protected]> Sat, 10 Sep 2022 19:30:57 -0700 (PDT)
| Newsgroups | alt.comp.lang.borland-delphi |
|---|---|
| Message-ID | <[email protected]> |
Calling TrySetLength on dynamic array of records causes memory corruption on some cases. It seems the array of records is not cleared properly. Hard to detect, the memory manager available memory should be set to garbage, to prove it ? How to do this ? I suspect the problem is with open array parameters which are written internally as array of TvarRec, TvarRec does not have a vtRecord... and perhaps the clear routine miss-understands the size of the record and/or array and does not clear it properly. Bye, Skybuck.