He to whom rent or compensation is due, whether he have the reversion or not, his personal representative or assignee, may recover it as provided in the preceding section, or may, in a proper case, resort to an attachment, whatever be the estate of the person owing it, or though his estate or interest in the land be ended. And when the owner of real estate in fee, or holder of a term, yielding him rent, dies, the rent thereafter due shall be recoverable by such owner's heir or devisee, or such term- holder's personal representative or devisee. And if the owner or holder alien or assign his estate or term, or the rent thereafter to fall due thereon, his alienee or assignee may recover such rent.