title | ms.custom | ms.date | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | f1_keywords | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CMemoryException Class | Microsoft Docs |
11/04/2016 |
|
reference |
|
|
|
9af0ed57-d12a-45ca-82b5-c910a60f7edf |
20 |
mikeblome |
mblome |
ghogen |
Represents an out-of-memory exception condition.
class CMemoryException : public CSimpleException
Name | Description |
---|---|
CMemoryException::CMemoryException | Constructs a CMemoryException object. |
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).
CMemoryException
Header: afx.h
Constructs a CMemoryException
object.
CMemoryException();
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.