Skip to content

the C.leveldb_free bug fix

saka2god edited this page Oct 19, 2013 · 1 revision

The C.leveldb_free may not fit the C.malloc if you built the leveldb lib in another enviroment such as msvs. So you must call C.free to free the memory which is malloced by golang. in file db.go do this change.

ldbname := C.CString(dbname) defer C.leveldb_free(unsafe.Pointer(ldbname)) -> defer C.free(unsafe.Pointer(ldbname))

total 6 lines need to fix.

Clone this wiki locally