On 18 Apr 2002 at 19:01, Adam Naumowicz wrote:
[...]
program tester;
type t=object procedure proc;virtual; constructor Init; end;
procedure t.proc; begin writeln('Proc'); end;
constructor t.init; begin writeln('Init'); proc; end;
var p:array[0..10] of t;
begin fillchar(p,sizeof(p),0); p[1].Init; end.
I assume, there was some optimalization added to call the virtual methods really the virtual way. Or maybe the constructor creates the VMTP at the end of the constructor process. Is there a chance to get the previous behavior back ?
Are you sure that you are not overwriting the VMT with the "fillchar" call? IIRC, it is not a good idea at all to use fillchar on records and objects. It might be better to initialise the fields manually.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~African_Chief email: African_Chief@bigfoot.com