Fix string memory free by gc