Menu

TStringList.Move

2012-07-18
2021-10-01
  • Michal Molhanec

    Michal Molhanec - 2012-07-18

    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.

     
  • Tomas Hajny

    Tomas Hajny - 2012-11-16

    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.

     
  • Michael Van Canneyt

    It should not free the object. I've applied a fix, revision 22992.

     

Log in to post a comment.

MongoDB Logo MongoDB