wie Luckie schon sagte:
Delphi-Quellcode:
regist := TRegistry.Create;
try
pub := TStringList.Create;
try
...
finally
pub.Free;
end;
finally
regist.free;
end;
oder notfalls auch sowas:
Delphi-Quellcode:
pub := nil;
regist := TRegistry.Create;
try
...
pub := TStringList.Create;
...
finally
{if Assigned(pub) then} pub.Free;
regist.free;
end;
[edit]
ach stimmt ja ... nja, zumindestens wenn man mal etwas nimmt, was nicht auf NIL prüft, dann halt selber prüfen
Ein Therapeut entspricht 1024 Gigapeut.