Du könntest ja auch mit Zeigern arbeiten?
Also in etwa so:
Delphi-Quellcode:
function CurrentOL : Pointer;
begin
if ... then result := @EineKomponente
else result := @EineAndereKompoente;
end;
FreeAndNil(CurrentOL^);
Ein Therapeut entspricht 1024 Gigapeut.