File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -117,14 +117,20 @@ node_db_mysql::Result::~Result() {
117
117
}
118
118
119
119
void node_db_mysql::Result::free () throw() {
120
+ this ->release ();
121
+
120
122
if (this ->columns != NULL ) {
121
123
for (uint16_t i = 0 ; i < this ->totalColumns ; i++) {
122
124
delete this ->columns [i];
123
125
}
124
126
delete [] this ->columns ;
125
127
}
128
+ }
129
+
130
+ void node_db_mysql::Result::release () throw() {
126
131
if (this ->result != NULL ) {
127
132
mysql_free_result (this ->result );
133
+ this ->result = NULL ;
128
134
}
129
135
}
130
136
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class Result : public node_db::Result {
27
27
28
28
explicit Result (MYSQL* connection) throw(node_db::Exception&);
29
29
~Result ();
30
+ void release () throw();
30
31
bool hasNext () const throw();
31
32
char ** next () throw(node_db::Exception&);
32
33
unsigned long * columnLengths () throw(node_db::Exception&);
You can’t perform that action at this time.
0 commit comments