func (cp *Checkpoint) Destroy() {
	C.rocksdb_checkpoint_object_destroy(cp.c)
	cp.c = nil
}
Destroy deallocates the Checkpoint object.
package rocksdb
import "C"
import (
	"errors"
	"unsafe"
)
type Checkpoint struct {
	c *C.rocksdb_checkpoint_t
}
func NewNativeCheckpoint(c *C.rocksdb_checkpoint_t) *Checkpoint {
	return &Checkpoint{c: c}
}
func (cp *Checkpoint) CreateCheckpoint(checkpointDir string, logSizeForFlush uint64) error {
	var cErr *C.char
	cDir := C.CString(checkpointDir)
	defer C.free(unsafe.Pointer(cDir))
	C.rocksdb_checkpoint_create(cp.c, cDir, C.uint64_t(logSizeForFlush), &cErr)
	if cErr != nil {
		defer C.free(unsafe.Pointer(cErr))
		return errors.New(C.GoString(cErr))
	}
	return nil
}