Renovate C extension code

* Release memory after loading dataset onto device