int main(int argc, char *argv[]){ Display *x; void *instance = 0x0; int retcode = 0; try{ cout << "Opening an 800x600 @ 24 bits display for 5 seconds..."; cout.flush(); x = new Display(driver_path, 800, 600, 24); x->open(true); sleep(5); x->close(); cout << "Deallocating... "; cout.flush(); xvr2_delete(x); cout << "done" << endl; } catch(Exception::Exception e){ cerr << "Operation failed: " << e.toString() << endl; } return retcode; }
~Impl() { if (m_display) m_display->close(); delete m_serial_tile_callback_factory; delete m_serial_renderer_controller; RENDERER_LOG_DEBUG("destroying osl shading system..."); m_project.get_scene()->release_optimized_osl_shader_groups(); m_shading_system->release(); delete m_renderer_services; const string stats = m_texture_system->getstats(); const string modified_stats = prefix_all_lines(trim_both(stats), "oiio: "); RENDERER_LOG_DEBUG("%s", modified_stats.c_str()); RENDERER_LOG_DEBUG("destroying oiio texture system..."); m_texture_system->release(); delete m_error_handler; }