Myframe := TMyFrame.Create(Self) FreeFrame(MyFrame) Procedure FreeFrame(frame:TFrame); begin frame.free; end;