Hello,
I've noticed that the TStrings.Move is implemented as:
Obj:=Objects;
Str:=Strings;
Delete(Curindex);
InsertObject(NewIndex,Str,Obj);
which is OK until you set OwnsObjects to True, because than the
TStringList.Delete will Free the object. If this is expected behaviour, add
please notice to the TStrings.Move documentation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the feedback. I personally cannot judge the topic / answer your question, but I suggest posting the documentation request as suggestion to our bug repository (http://bugs.freepascal.org) so it can be tracked as appropriate.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've noticed that the TStrings.Move is implemented as:
Obj:=Objects;
Str:=Strings;
Delete(Curindex);
InsertObject(NewIndex,Str,Obj);
which is OK until you set OwnsObjects to True, because than the
TStringList.Delete will Free the object. If this is expected behaviour, add
please notice to the TStrings.Move documentation.
Thanks for the feedback. I personally cannot judge the topic / answer your question, but I suggest posting the documentation request as suggestion to our bug repository (http://bugs.freepascal.org) so it can be tracked as appropriate.
It should not free the object. I've applied a fix, revision 22992.