Re: cannot longjmp from g_log_set_handler function



On Sun, Mar 28, 1999 at 10:54:48PM +0900, Ionutz Borcoman wrote:
> On 27 Mar 1999, Owen Taylor wrote (about longjumps):
> >
> >  - You will almost certainly leak memory.
> 
> >  - You may well leave GTK+ in an inconsistent state
> >    that and may well get segfaults if you continue
> >    using GTK+
> 
> Are exceptions safe to use from C++ (with try() ... throw() ... catch())
> ? 

As GTK+ is a C library it can't be exeption safe. C++ exeption cleans
up by unwinding the stack and call the destructor for all auto objects
that goes out of scoop. C hav no such featurs! You have to wrapp all
GTK resorses into C++ classes that cleans up on destruction to make
Your code exeption safe.

I do not know if GTK-- is exeption safe so I leave that to someone else
to answer.

HTH /Lars



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]