0
I have the following routine that destroys forgotten forms opened by the user:
...    
        for i := qtd - 1 downto 0 do
        begin
                if (Application.components[i] is TForm) then
                begin
                    TForm(Application.components[i]).Close;
                    *** AQUI A NECESSIDADE DO *** 
                    FreeAndNil(Application.components[i]);
                end;
        end;
Note that I need to finish the forms with Freeandnil but I am not able to pass the variable, because there requires a Tobject in case the Unit/Form to be released.
Application.components[i].Destroydoesn’t solve?– Roberto de Campos