In June 1830, King William IV became the oldest person to ascend the British throne. Both his age and lack of legitimate children soon began causing concern over what would happen in the case of his death.
Unless he and Queen Adelaide could produce an heir, the crown would pass onto his eleven year old niece, Princess Victoria of Kent. However, Victoria's age was too of concern as she was still a minor, making her unable to rule independently. As a result, on 23rd December 1830, the ‘Regency Act’ was put in place.
The new Act meant clarified two concerns: what would happen if Victoria became Queen while she was still below the age of eighteen, and also what would happen if Queen Adelaide gave birth to the kings baby either before or after his death.
In the instance of a legitimate child or pregnancy, the baby would have instantly become monarch (born or not) and Adelaide would have acted as Regent until it turned eighteen. Similarly, if Victoria had inherited the throne, her mother, the Duchess of Kent, would have taken on the role.
In the instance of Queen Adelaide’s death and the King remarrying, the Regency Act would have no longer been applicable.
When King William died in June 1837, he was still without an heir of his own. As a result, Victoria, who had celebrated her eighteenth birthday just a month earlier, had avoided a Regency and was able to rule freely.