Subject Re: [IBO] More on resources not being freed
Author Lucas Franzen
Gary,

Even if I'm not Helen, I'd like to point out that in the last example
you didn't free the cursor, in this one you created it twice (see
below).


> procedure TForm1.Button1Click(Sender: TObject);
> var
> WCursor: TIB_Cursor;
> begin
> Conn.Connect;
> WCursor := TIB_Cursor.Create(Self); << Created 1st time
> try
> WCursor := TIB_Cursor.Create(Self); << Created 2nd time
> WCursor.SQL.Text := 'SELECT * FROM CUSTOMER';
> WCursor.APIFirst;
> WCursor.Unprepare;
> finally
> WCursor.Free;
> end;
> Conn.Disconnect;
> end;
>

So what does your real code look like?

Luc.