I suspect a memory leak, I wonder if the following code might be responsible for this:
Code:
const
b: array[0..12] of Byte = (1, 2, 3, 4, 5, 6, 7,8,9,10,11,12);
procedure readData(var X);
var
M: array[0..1] of Integer absolute X;
begin
// only read from M no writing here
end;
procedure DoSmthing;
begin
readData(b[2]);
end;
I know that when b would be an ordinary array then everything would be okay, but b is a const. Can it cause a memory leak?
Siim
Bookmarks