SVN commit 1131706 by trueg: Use QScopedPointer instead of our own implementation. M +2 -17 odbcqueryresult.cpp --- trunk/kdesupport/soprano/backends/virtuoso/odbcqueryresult.cpp #1131705:1131706 @@ -33,6 +33,7 @@ #include #include #include +#include #include @@ -105,22 +106,6 @@ } -namespace { - class DataArrayPointer - { - public: - DataArrayPointer( SQLCHAR* data ) - : m_data( data ) { - } - ~DataArrayPointer() { - delete [] m_data; - } - - private: - SQLCHAR* m_data; - }; -} - Soprano::Node Soprano::ODBC::QueryResult::getData( int colNum ) { SQLCHAR* data = 0; @@ -130,7 +115,7 @@ int dvtype = 0; // easy mem cleanup: never care about data again below - DataArrayPointer dap( data ); + QScopedPointer > dap( data ); // // Before we can retrieve the column meta data using SQLGetDescField,