// Free releases all the memory associated with the generator // within the C part of gsl func (s *RngState) Free() { C.gsl_rng_free(s.state) s.state = nil // to make sure we don't use after freeing }
func freeRandomGenerator(r *C.gsl_rng) { C.gsl_rng_free(r) }
func (x *GslRng) Dispose() { C.gsl_rng_free((*C.gsl_rng)(unsafe.Pointer(x.Ptr()))) }
// Free cleans up the RNG func (r *RNG) Free() { C.gsl_rng_free(r.rng) }