Try using the default deleter, which is functionally equivalent to current lg_free_* functions.