add some memory releasing