murphyif: properly release memory when unloading.