MCPcopy Create free account
hub / github.com/mysql/mysql-connector-python / MySQL_dealloc

Function MySQL_dealloc

mysql-connector-python/src/mysql_capi.c:318–331  ·  view source on GitHub ↗

MySQL instance destructor function. MySQL instance destructor freeing result (if any) and closing the connection. @param self MySQL instance */

Source from the content-addressed store, hash-verified

316 @param self MySQL instance
317*/
318void
319MySQL_dealloc(MySQL *self)
320{
321 if (self) {
322 Py_XDECREF(MySQL_free_result(self));
323 mysql_close(&self->session);
324
325 Py_DECREF(self->charset_name);
326 Py_DECREF(self->auth_plugin);
327 Py_DECREF(self->plugin_dir);
328
329 Py_TYPE(self)->tp_free((PyObject *)self);
330 }
331}
332
333/**
334 MySQL instance creation function.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…