support deinit function