Hey everyone,

I'm getting a strange AV. Don't really know why it's popping up.

Code:
type
  PMyRec = ^TMyRec;
  TMyRec = record
    Str: String;
    Int: Integer;
  end;

procedure TForm1.Button5Click(Sender: TObject);
var
  P: PMyRec;
begin
  GetMem(P, sizeof(TMyRec));
  P^.Str := 'test';   //<< AV HERE!
  P^.Int := 5;

  FreeMem(P);
end;
This should go fine. I just set the Str which is actually a special kind of pointer, to point to 'test'.

Can somebody enlighten me?

Thanks