OK, the reason for the AV was, that with the "SetFocus"-call in "TImageEnVect.RemoveTextEdit" (unit ievect) my global eventhandler "ImageEnview1.enter" was called and there were some actions done, before all the other work in "RemoveAllObjects" was done.
The exception occurs then in:
procedure TIETextControl.RemoveUnreferenced();
var
ref: pintegerarray; //1=referenced 0=unref
i, j: integer;
ci: PIECharInfo;
begin
getmem(ref, sizeof(integer) * fCharInfo.Count);
i := 0;
while i < fCharInfo.Count do
...
end;
here in the first line, because "fCharInfo" was NIL.
Even when I have changed my code, so it would perhaps good in future, to add one line of code in this proc above:
If fCharCount = NIL then Exit;
HS