다음을 통해 공유


OutOfMemoryException 클래스

프로그램을 계속 실행하기 위한 메모리가 부족할 때 throw되는 예외입니다.

네임스페이스: System
어셈블리: mscorlib(mscorlib.dll)

구문

‘선언
<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public Class OutOfMemoryException
    Inherits SystemException
‘사용 방법
Dim instance As OutOfMemoryException
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public class OutOfMemoryException : SystemException
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public ref class OutOfMemoryException : public SystemException
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public class OutOfMemoryException extends SystemException
SerializableAttribute 
ComVisibleAttribute(true) 
public class OutOfMemoryException extends SystemException

설명

다음 MSIL(Microsoft Intermediate Language) 명령은 OutOfMemoryException을 throw합니다.

  • box

  • newarr

  • newobj

OutOfMemoryException은 0x8007000E 값을 가지는 HRESULT COR_E_OUTOFMEMORY를 사용합니다.

OutOfMemoryException 인스턴스의 초기 속성 값 목록에 대한 자세한 내용은 OutOfMemoryException 생성자를 참조하십시오.

참고

상속된 Data 속성의 값은 항상 Null 참조(Visual Basic의 경우 Nothing)입니다.

Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows CE 플랫폼 참고: 리소스 제약이 있는 장치에서 이 예외가 발생하지 않도록 하려면 64KB 이상의 메모리를 사용하는 메서드를 사용하지 않아야 합니다.

상속 계층 구조

System.Object
   System.Exception
     System.SystemException
      System.OutOfMemoryException
         System.InsufficientMemoryException

스레드로부터의 안전성

이 형식의 모든 public static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

OutOfMemoryException 멤버
System 네임스페이스
Exception 클래스

기타 리소스

예외 처리 및 Throw