Exemple #1
0
func (e *clEngine) Destroy() {
	e.mtx.Lock()
	defer e.mtx.Unlock()
	if e.engine != nil {
		C.cl_engine_free(e.engine)
		e.engine = nil
		e.compiled = 0
	}
}
Exemple #2
0
// Free relleases the memory associated with ClamAV. Since the ClamAV
// engine can consume several megabytes of memory which is not visible
// by the Go garbage collector, Free should be called when the engine is no
// longer in use.
func (e *Engine) Free() int {
	return int(C.cl_engine_free((*C.struct_cl_engine)(e)))
}