delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/08/21:09:16

From: GSM77 AT aol DOT com
Message-ID: <f5d8575c.36bee614@aol.com>
Date: Mon, 8 Feb 1999 08:26:44 EST
To: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re : Getting new to throw bad_alloc.
X-Mailer: AOL 3.0.i for Windows sub 139
Reply-To: djgpp AT delorie DOT com

Hi 

First Question : No it don't , but it should.

Second Question : Yes , it's the best way

Follow a piece of code, 
it do what you want , and it work niece well ...
( To put in ONLY one of you file )

-----------------------------------------------------------------
void out_of_memory()
  { throw bad_alloc; }                

struct ExcAlloc_AutoInit
  {
    ExcAlloc_AutoInit()
      { set_new_handler(out_of_memory); }

  } ExcAlloc_AutoInit_Proc;
-----------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019