clear code of MemManage