Sign in Join
FPDoc Onlineexperiment

StrDispose procedure

In unit sysutils

Dispose of a null-terminated string on the heap.

Declaration

pascal
procedure StrDispose(Str: PAnsiChar)

Description

StrDispose frees any memory allocated for Str. This function will only function correctly if Str has been allocated on the heap, for example using StrAlloc or StrNew from the SysUtils unit.

For an example, see StrBufSize.

Errors

If an invalid pointer is passed, or a pointer not allocated with StrAlloc, an error may occur.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.