Add finalizer to Memory
Merge branch '#5' into 0.0.x - close #5