scryinfo / cashbox

Apache License 2.0
44 stars 8 forks source link

fixed memory leak for "impl<T: CMark> CStruct for *mut T {" #29

Closed peacess closed 3 years ago

peacess commented 3 years ago

如果T为“mut”类型,实际类型为“mut *mut”,这时调用free方法只把第一层的内存释放了。所以增加一个CMark trait来解决这个问题