func (c *OCI8Conn) Close() error { rv := C.OCILogoff( (*C.OCIServer)(c.svc), (*C.OCIError)(c.err)) if rv == C.OCI_ERROR { return ociGetError(c.err) } C.OCIHandleFree( c.env, C.OCI_HTYPE_ENV) c.svc = nil c.env = nil c.err = nil return nil }
func (c *OCI8Conn) Close() error { var err error if rv := C.OCILogoff( (*C.OCISvcCtx)(c.svc), (*C.OCIError)(c.err)); rv != C.OCI_SUCCESS { err = ociGetError(c.err) } C.OCIHandleFree( c.env, C.OCI_HTYPE_ENV) c.svc = nil c.env = nil c.err = nil runtime.SetFinalizer(c, nil) return err }
func (c *OCI8Conn) Close() error { if c.closed { return nil } c.closed = true var err error if rv := C.OCILogoff( (*C.OCISvcCtx)(c.svc), (*C.OCIError)(c.err)); rv != C.OCI_SUCCESS { err = ociGetError(rv, c.err) } C.OCIHandleFree( c.env, C.OCI_HTYPE_ENV) c.svc = nil c.env = nil c.err = nil return err }