If I pass records using the Var (by reference) keyword, does it pass the whole record, or just a reference (pointer) to them? This is purely a stack issue. Our records are huge, and we have issues with C# programs (ASP.NET) running out of stack when they call our DLL.
If I pass records using the Var (by reference) keyword, does it pass the whole record, or just a reference (pointer) to them? This is purely a stack issue. Our records are huge, and we have issues with C# programs (ASP.NET) running out of stack when they call our DLL.
Yes. (or 4 bytes on 32bit compiler)
ReplyDeleteAnd not necessarily on the stack, depends on the ABI. A register on the x64 calling convention for instance.
ReplyDeleteBottom line if I use pointers or by reference, it's not hitting the stack too hard. Sweet..
ReplyDelete