use refmem struct and destructor
remove useless pool allocator