How to Obtain Efficient Garbage Collection of C-Ptrs

I recently fixed a similar issue in CodecZlib.jl by getting the C library to use jl_malloc and jl_free instead of malloc and free Ref: C struct garbage collection not run frequently enough - #14 by vchuravy