Skip to content

Commit

Permalink
Add Destroy method for EnvOption
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhenkai Zhu committed May 11, 2017
1 parent a4e4efd commit ff25ae1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions options_env.go
Expand Up @@ -17,3 +17,9 @@ func NewDefaultEnvOptions() *EnvOptions {
func NewNativeEnvOptions(c *C.rocksdb_envoptions_t) *EnvOptions {
return &EnvOptions{c: c}
}

// Destroy deallocates the EnvOptions object.
func (opts *EnvOptions) Destroy() {
C.rocksdb_envoptions_destroy(opts.c)
opts.c = nil
}

0 comments on commit ff25ae1

Please sign in to comment.