Viewer::~Viewer() { //OSG_NOTICE<<"Viewer::~Viewer()"<<std::endl; Threads threads; getAllThreads(threads); OSG_INFO<<"Viewer::~Viewer():: start destructor getThreads = "<<threads.size()<<std::endl; stopThreading(); if (_scene.valid() && _scene->getDatabasePager()) { _scene->getDatabasePager()->cancel(); _scene->setDatabasePager(0); } Contexts contexts; getContexts(contexts); // clear out all the previously assigned operations for(Contexts::iterator citr = contexts.begin(); citr != contexts.end(); ++citr) { (*citr)->close(); } //OSG_NOTICE<<"finish Viewer::~Viewer()"<<std::endl; getAllThreads(threads); OSG_INFO<<"Viewer::~Viewer() end destructor getThreads = "<<threads.size()<<std::endl; }
Viewer::~Viewer() { //OSG_NOTICE<<"Viewer::~Viewer()"<<std::endl; Threads threads; getAllThreads(threads); OSG_INFO<<"Viewer::~Viewer():: start destructor getThreads = "<<threads.size()<<std::endl; stopThreading(); if (_scene.valid() && _scene->getDatabasePager()) { _scene->getDatabasePager()->cancel(); _scene->setDatabasePager(0); } Contexts contexts; getContexts(contexts); // clear out all the previously assigned operations for(Contexts::iterator citr = contexts.begin(); citr != contexts.end(); ++citr) { osg::GraphicsContext* gc = *citr; // Run destroy operation on each context before closing it if (_cleanUpOperation.valid() && gc->valid()) { gc->makeCurrent(); (*_cleanUpOperation)(gc); gc->releaseContext(); } gc->close(); } //OSG_NOTICE<<"finish Viewer::~Viewer()"<<std::endl; getAllThreads(threads); OSG_INFO<<"Viewer::~Viewer() end destructor getThreads = "<<threads.size()<<std::endl; }
void IPCEngineHost::selectThread(int index) { resetLocation(); Threads threads = threadsHandler()->threads(); QTC_ASSERT(index < threads.size(), return); QByteArray p; { QDataStream s(&p, QIODevice::WriteOnly); SET_NATIVE_BYTE_ORDER(s); s << quint64(threads.at(index).id); } rpcCall(SelectThread, p); }