[fpc-pascal] Problem with objects
Santiago Amposta
svaa at ciberpiula.net
Wed Dec 23 10:37:14 CET 2015
Hello:
I use fpc 2.6.4 and I have a problem of memory leaks, strange errors,
etc. Finally I have tracked it to this:
TSimpleArrayString=object
List:array of String;
end;
TDerivedArrayString=object(TSimpleArrayString)
other_field:integer;
end;
procedure TestSimple;
var
A:TSimpleArrayString;
begin
setLength(A.List,0);
end;
procedure TestDerived;
var
A:TDerivedArrayString;
begin
setLength(A.List,0);
end;
TestSimple; // Works Fine,
TestDerived; // rises an exception SIGSEGV on setLength
What am I doing wrong?
--
Regards
Santiago A.
More information about the fpc-pascal
mailing list