Home Are const record arguments put on the stack?
 Suppose I have a record type called TSomeRec: type TSomeRec = record // ... end;  ... and a procedure that takes a const TSomeRec argument: procedure SomeProc(const someRec: TSomeRec); begin // ... end;  When SomeProc is called, will the const someRec argument be passed on the stack as a value or as a reference? The reason I ask is that in the code I am working on, the record type in question contains a massive static array and so is huge. (No, I cannot change that.) I am nervous about putting such a large record on the stack, and I thought that const might help. I have had problems with this code with overflowing the stack, and when that happens, I just get mysterious access violations rather than any sort of stack overflow error.