However, I am leaving, and if she agrees to take over the lease, can I get it in writing and be free of all responsibilities if there is trouble in coming months?
That's a question you need to ask your landlord.

Your landlord is not obligated to release you from the responsibilities of your lease.