Implementing destructors for ramfs and helper data structures