I started to run a job & then after a several 100K interations & a few hours into the primary loop I realized that forgot to do some basic cleaning at the bottom of the loop (blame it on the cold meds ). Thing is, the program hasn't died on me yet & I would have thought it should.
Question: Does g++ handle the following, or is my proggie doomed?
here's a sanitized snippet:
g++ isn't smart enuf to call the destructor when I reuse the "Query q1" object is it?Code:while (q0.FetchRow()){ int n; sprintf(sql, "SELECT stuff FROM table WHERE Id = %s", q0.Row[0]); Query q1(sql); //Object creation n = 0; while (q1.FetchRow()) if (someFunc(atoi(q1.Row[0]))) ++n; if (n >= number) cout << "some results " << q0.Row[2] << endl; //delete q1; <--THIS IS THE LINE I FORGOT! }