You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, if you keep a PreparedStatement around, you have no way of deinitializing it. Is there a reason why you can only deinit it through PrepareResult?
The text was updated successfully, but these errors were encountered:
@chung-leong Thanks for feedback. It is common for users to instinctively call deinit on PrepareResult after initialization. Having deinit in PreparedStatement as public method may likely result in users trying to call it as well, resulting in double free, as PrepareResult.deinit will attempt to free PreparedStatement.
Admittedly, I have not considered the case of lingering PreparedStatement.
As a workaround (without code change), you can keep PrepareResult around, and use PerpareResult.stmt to get PreparedStatement.
Right now, if you keep a
PreparedStatement
around, you have no way of deinitializing it. Is there a reason why you can only deinit it throughPrepareResult
?The text was updated successfully, but these errors were encountered: