Destroy shuts down and frees any resources related to the PHP engine bindings.
()
| 106 | |
| 107 | // Destroy shuts down and frees any resources related to the PHP engine bindings. |
| 108 | func (e *Engine) Destroy() { |
| 109 | if e.engine == nil { |
| 110 | return |
| 111 | } |
| 112 | |
| 113 | for _, r := range e.receivers { |
| 114 | r.Destroy() |
| 115 | } |
| 116 | |
| 117 | e.receivers = nil |
| 118 | |
| 119 | for _, c := range e.contexts { |
| 120 | c.Destroy() |
| 121 | } |
| 122 | |
| 123 | e.contexts = nil |
| 124 | |
| 125 | C.engine_shutdown(e.engine) |
| 126 | e.engine = nil |
| 127 | |
| 128 | engine = nil |
| 129 | } |
| 130 | |
| 131 | func write(w io.Writer, buffer unsafe.Pointer, length C.uint) C.int { |
| 132 | // Do not return error if writer is unavailable. |
no outgoing calls
no test coverage detected