MySQL Forums
Forum List  »  Connector/C++

Re: Prepared Statements not getting closed
Posted by: Andrii Nikitin
Date: August 08, 2012 02:33PM

Nevermind, you have leak in code: res never gets deleted, this is why connection is actually not closed.


I kind of agree that logically after pstmt->close(); statement may be expected to be closed on MySQL Server, but you will not be able to use 'res' after that.

So statement will not be closed until you delete result set, this is also quite valid logic, so no bug here.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Prepared Statements not getting closed
2763
August 08, 2012 02:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.