next up previous contents index
Next: StrECopy Up: Functions and procedures. Previous: StrCopy

StrDispose

   

Declaration:

Procedure StrDispose (P : PChar) ;

Description:

Removes the string in P from the heap and releases the memory.

Errors:

None.

See also:

Dispose (), StrNew

Example
Program Example17;

Uses strings;

{ Program to demonstrate the StrDispose function. }

Const P1 : PChar = 'This is a PChar string';

var P2 : PChar;

begin
  Writeln ('Before StnNew : Memory available : ',MemAvail);
  P2:=StrNew (P1);
  Writeln ('After StrNew : Memory available : ',MemAvail);
  Writeln ('P2 : ',P2);
  StrDispose(P2);
  Writeln ('After StrDispose : Memory available : ',MemAvail);
end.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998