home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 February
/
Chip_2000-02_cd.bin
/
zkuste
/
Delphi
/
navody
/
tt
/
objvm.exe
/
UNITS
/
FreeMember.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1998-06-26
|
744b
|
28 lines
unit FreeMember;
interface
uses MemberValue,
LangValue;
type
{TFreeMember realizes Free procedure for objects}
TFreeMember=class(TMemberValue)
procedure Exec(S:IValStack;MustReturn:boolean);override;
end;
implementation
uses VarLangValue,ObjectValue;
procedure TFreeMember.Exec;
Var a:ILangValue;
begin
S.DropFrame;
if MustReturn then
begin
a:=TVarLangValue.Create(nil);
a.AsBoolean:=true;
s.Push(a);
end;
if Parent is TObjectValue then
(Parent as TObjectValue).Target.Free;
Parent.Free;
end;
end.