ex17.pp 405 B

123456789101112131415161718
  1. Program Example17;
  2. Uses strings;
  3. { Program to demonstrate the StrDispose function. }
  4. Const P1 : PChar = 'This is a PChar string';
  5. var P2 : PChar;
  6. begin
  7. Writeln ('Before StnNew : Memory available : ',MemAvail);
  8. P2:=StrNew (P1);
  9. Writeln ('After StrNew : Memory available : ',MemAvail);
  10. Writeln ('P2 : ',P2);
  11. StrDispose(P2);
  12. Writeln ('After StrDispose : Memory available : ',MemAvail);
  13. end.