use custom allocation errors handler
This commit is contained in:
parent
636c3ac90e
commit
5017da5fe4
|
|
@ -39,6 +39,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void new_handler(){
|
||||||
|
Error( "Memory allocation failed, terminating" );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ExitQ3Map()
|
ExitQ3Map()
|
||||||
cleanup routine
|
cleanup routine
|
||||||
|
|
@ -77,6 +81,9 @@ int main( int argc, char **argv ){
|
||||||
/* set exit call */
|
/* set exit call */
|
||||||
atexit( ExitQ3Map );
|
atexit( ExitQ3Map );
|
||||||
|
|
||||||
|
/* set allocation error callback */
|
||||||
|
std::set_new_handler( new_handler );
|
||||||
|
|
||||||
Args args( argc, argv );
|
Args args( argc, argv );
|
||||||
|
|
||||||
/* read general options first */
|
/* read general options first */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user