Document request-scoped MySQL cleanup

This commit is contained in:
udo
2026-07-08 18:44:07 +00:00
parent 6bdccacf02
commit 0ff42f357f
5 changed files with 14 additions and 4 deletions
+4 -2
View File
@@ -33,8 +33,10 @@ struct MySQL {
DValue query(String q, StringMap params);
DValue get_pending_result();
// Unregisters from the request's connection tracking, so stack-allocated
// instances cannot leave dangling pointers behind for request cleanup.
// Unregisters from request connection tracking, so stack-allocated instances
// cannot leave dangling pointers behind for request cleanup. Heap handles
// returned by mysql_connect() are also request-owned and auto-closed at the
// end of the request if user code does not call mysql_disconnect() first.
~MySQL() { disconnect(); }
};