José Mejuto wrote:
Hello FPC-Pascal,
If I have a class like:
TMyClassPublished=class(TObject)
published
procedure MyProcedure; virtual;
end;
And a derived one:
TMyClassDerived=class(TMyClassPublished)
public
procedure MyProcedure; override;
end;
Is there any difference in the derived one with less visibility in the
method ? This means, does it use less/more memory, more/less calling
speed, more/less RTTI information, ... ?
no, no, no, no
You cannot lower visibility, since the following example is still possible:
var
a:TMyClassPublished;
begin
a := TMyClassDerived.Create;
a.MyProcedure;
end;
it will use the scope of a and not the "redefined" scope in TMyClassDerived
Marc
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal