comparison rdf/SimpleSPARQLQuery.cpp @ 505:db398832518b

* Avoid a sometime crash on exit, by simply not deleting stuff
author Chris Cannam
date Fri, 05 Dec 2008 11:24:13 +0000
parents 438f4e295a9c
children 0944d13689b2
comparison
equal deleted inserted replaced
504:3376dc26dece 505:db398832518b
92 } 92 }
93 } 93 }
94 94
95 WredlandWorldWrapper::~WredlandWorldWrapper() 95 WredlandWorldWrapper::~WredlandWorldWrapper()
96 { 96 {
97 /*!!! This is a static singleton; destroying it while there are
98 queries outstanding can be problematic, it appears, and since
99 the storage is non-persistent there shouldn't be any need to
100 destroy it explicitly, except for the sake of tidiness.
101
97 while (!m_ownModelUris.empty()) { 102 while (!m_ownModelUris.empty()) {
98 librdf_free_model(m_ownModelUris.begin()->second); 103 librdf_free_model(m_ownModelUris.begin()->second);
99 m_ownModelUris.erase(m_ownModelUris.begin()); 104 m_ownModelUris.erase(m_ownModelUris.begin());
100 } 105 }
101 while (!m_ownStorageUris.empty()) { 106 while (!m_ownStorageUris.empty()) {
103 m_ownStorageUris.erase(m_ownStorageUris.begin()); 108 m_ownStorageUris.erase(m_ownStorageUris.begin());
104 } 109 }
105 if (m_defaultModel) librdf_free_model(m_defaultModel); 110 if (m_defaultModel) librdf_free_model(m_defaultModel);
106 if (m_defaultStorage) librdf_free_storage(m_defaultStorage); 111 if (m_defaultStorage) librdf_free_storage(m_defaultStorage);
107 if (m_world) librdf_free_world(m_world); 112 if (m_world) librdf_free_world(m_world);
113 */
108 } 114 }
109 115
110 bool 116 bool
111 WredlandWorldWrapper::isOK() const { 117 WredlandWorldWrapper::isOK() const {
112 return (m_defaultModel != 0); 118 return (m_defaultModel != 0);