Actually, the landlord is not required to rent that apartment at all. And technically speaking, your rent is accelerated to the end of your lease. This means if your rent is $500/month and you have ten months left then you owe $5,000 now. Plus you still owe the reletting fee, which is generally 85% of one months rent. Of course if the apartment is released then you will receive a refund for those day that you have already paid starting from the point that the new resident moves in.
Further, sub-leasing in the sense that everyone knows it is not allowed in most cases. This means that someone else is living in the apartment but not on the lease and you are elsewhere. I can transfer the lease terms, which means that a person takes over your lease granted they are approved by the manager to do so. This keeps all liability off of you if they screw things up.