void init() { new QCoreApplication(); }void uninit() { delete QCoreApplication::instance(); }void * createSocket() { return new QSocket(); } // return handle to socketvoid destroySocket( void * handle ) { delete (QSocket *)handle; }void doSomething( void * handle, /* params */ ){ QSocket * s = (QSocket *)handle; // blah blah}
pApp->~QApplication();