Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

StrDispose

Dispose of a null-terminated string on the heap.

Declaration

Source position: syspchh.inc line 43

procedure StrDispose(

  Str: PAnsiChar

);

procedure StrDispose(

  str: PWideChar

);

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

StrBufSize

  

Return the size of a null-terminated string allocated on the heap.

StrAlloc

  

Allocate a null-terminated string on the heap.

StrNew

  

Allocate room for new null-terminated string.


Documentation generated on: Oct 27 2024