Mind, that you pass the string as pointer. It will therefore not be refcounted.So you must keep the original string for the duration of the call, and you must NOT modify it in any way.
Quote from: Martin_fr on June 22, 2025, 10:36:55 pmMind, that you pass the string as pointer. It will therefore not be refcounted.So you must keep the original string for the duration of the call, and you must NOT modify it in any way.You can avoid that if you call UniqueString ? Although that is not strictly fully immutable, it is less of a risk.
Code: Pascal [Select][+][-]procedure TForm1.FormCreate(Sender: TObject);begin QuestionDlg('title', 'text', mtConfirmation, [ 0, 'no icon', 1, 'i1', 2, 'i2', 3, 'i3', 4, 'i4', 5, 'i5', 6, 'i6', 7, 'i7', 8, 'i8' ], 0);end;
Have you read the original question?