free the wrapped haskell sub when perl GC