set dealloc func for Nanomsg::Socket