[CXX-100] ScopedDbConnection : it is an error if I dont call done()??? Created: 08/Sep/10  Updated: 10/Apr/14  Resolved: 12/Mar/14

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Lance Diduck Assignee: Unassigned
Resolution: Done Votes: 0
Labels: cxxmove, legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All



 Description   

The RAII C++ idiom relies on the dtor cleaning up resources for me. This is what is implied by "Scoped"

So why it is that I need to call done() else I get some warning? ScopedDbConnection::~ScopedDbConnection should call done() for me. And If I decide to call done() myself, then ~ScopedDbConnection is a no-op



 Comments   
Comment by Andrew Morrow (Inactive) [ 12/Mar/14 ]

There is no work to be done here.

Comment by Eliot Horowitz (Inactive) [ 06/Jan/12 ]

The problem then is that the rules are non consistent.

Comment by Mathias Stearn [ 06/Jan/12 ]

It might not be too bad. If we set a dirty flag before writing a query and clear it after reading a full reply message it should work.

Comment by Eliot Horowitz (Inactive) [ 08/Sep/10 ]

The reason why this is hard is that error cases are tricky - as you can't leave data on the wire.
Can probably be cleaned up - but is a fair amount of work.

Generated at Wed Feb 07 21:58:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.