TStringList.Move

2012-07-18
2012-11-16
  • 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.

     
    • Anonymous - 2012-11-16

      Your email to Cor'e was automatically blocked as SPAM because correspondence with Cor'e requires his SPAM Key to be placed in the email body or Subject line.

      SPAM Key: =)

       
  • Michael Van Canneyt

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

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks