System.SysUtils.EInvalidPointer

From RAD Studio API Documentation
Jump to: navigation, search

System.SysUtils.EHeapExceptionSystem.SysUtils.ExceptionSystem.TObjectEInvalidPointer

Delphi

EInvalidPointer = class(EHeapException);

C++

class PASCALIMPLEMENTATION EInvalidPointer : public EHeapException

Properties

Type Visibility Source Unit Parent
class public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

EInvalidPointer is the exception class for invalid pointer operations.

EInvalidPointer is raised when an application attempts an invalid pointer operation. For example, it can occur if an application tries to dispose of the same pointer twice, or refers to a pointer which has already been disposed of.

Notes:

  • Never raise an EInvalidPointer exception directly. EInvalidPointer is raised internally by the memory manager.
  • If a pointer to unallocated memory is passed to Dispose or FreeMem, the behavior of the application largely depends on the target platform, as follows:
    • For Windows platforms, an EInvalidPointer is raised in applications using System.SysUtils, and a run-time error is produced for applications that do not use System.SysUtils. (FastMM, the default memory manager, can detect an invalid pointer.)
    • For OS X and iOS platforms, Dispose and FreeMem do not raise an EInvalidPointer exception if an invalid pointer is passed to them.

See Also