Seamus Thomas Carroll writes: > > On the client side I thought about using netChannel::close to inform the > server that the socket is closed but the function is never > called. netChannel::close is called in the clients destructor but the > destructor is never called because FGGlobals *globals is never deleted > (from what I can tell) which in turn would delete my client. > > Any thoughts on the matter? Would putting "delete globals" somewhere in > the code which down the line would call netChannel::close() be the solution?
Easy enough to test try moving globals = new FGGlobals; out of main,cxx fgMainInit( int argc, char **argv ) { into bootstrap.cxx 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; exit(1); } delete globals; .... } Norman _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel