unit Unit1; 

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  uprobred;

type

  { TForm1 }

  TForm1 = class(TForm)
    liberar: TButton;
    etiqueta1: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure liberarClick(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end; 

var
  Form1: TForm1;
  a:TFx_rest1;
  c:TFx_rest2;
  b:integer;

implementation
{$R *.lfm}

{ TForm1 }

procedure TForm1.FormCreate(Sender: TObject);
begin
  a:= TFx_rest1.create(2);
  c:=TFx_rest2.create(2);
  etiqueta1.caption := 'creado';
end;

procedure TForm1.liberarClick(Sender: TObject);
begin
  a.free;
  c.free;
   etiqueta1.caption := 'liberado';
end;


end.

