Seamus Thomas Carroll writes:
>
> I put a cerr << "delete globals" << endl; where you have "delete globals;"
> in the code below and when I exit flightgear "delete globals" is not
> printed. Does the same happen for you?
oops that what I get for not testing code suggestions
we are exiting from inside the try / catch. construct
try adding the line as below
> > main(int argc, char **argv)
> > {
> > .......
> > globals = new FGGlobals;
> >
> > // FIXME: add other, more specific
> > // exceptions.
> > try {
> > fgMainInit(argc, argv);
> > } catch (sg_throwable &t) {
> > // We must use cerr rather than
> > // logging, since logging may be
> > // disabled.
> > cerr << "Fatal error: " << t.getFormattedMessage()
> > << "\n (received from " << t.getOrigin() << ')' << endl;
delete globals;
> > exit(1);
> > }
> > delete globals;
> > ....
> > }
Norman
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel