No, transferring messages will not affect your phone's memory. The messages will be stored in your iPhone's message app.