#purge() method for memory clean up and serialization support