Skip to content

Latest commit

 

History

History
89 lines (70 loc) · 2.46 KB

File metadata and controls

89 lines (70 loc) · 2.46 KB
title CMemoryException Class | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic reference
f1_keywords
CMemoryException
AFX/CMemoryException
AFX/CMemoryException::CMemoryException
dev_langs
C++
helpviewer_keywords
CMemoryException class
memory exceptions
exceptions, memory type
C++ exception handling, memory
memory, exception handling
ms.assetid 9af0ed57-d12a-45ca-82b5-c910a60f7edf
caps.latest.revision 20
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

CMemoryException Class

Represents an out-of-memory exception condition.

Syntax

class CMemoryException : public CSimpleException  

Members

Public Constructors

Name Description
CMemoryException::CMemoryException Constructs a CMemoryException object.

Remarks

No further qualification is necessary or possible. Memory exceptions are thrown automatically by new. If you write your own memory functions, using malloc, for example, then you are responsible for throwing memory exceptions.

For more information on CMemoryException, see the article Exception Handling (MFC).

Inheritance Hierarchy

CObject

CException

CSimpleException

CMemoryException

Requirements

Header: afx.h

CMemoryException::CMemoryException

Constructs a CMemoryException object.

CMemoryException();  

Remarks

Do not use this constructor directly, but rather call the global function AfxThrowMemoryException. this global function can succeed in an out-of-memory situation because it constructs the exception object in previously allocated memory. for more information about exception processing, see the article exceptions.

See Also

CException Class
Hierarchy Chart