Ref. No. 2127/44-2188
In the name of Allah the most Gracious the most Merciful
The answer to your question is as follows:
If the woman could not fulfill her wish during her lifetime nor she made a will for the construction of a mosque and the marriage of orphan girls, then after her death the whole amount will be distributed among her heirs. The distribution will be according to the Shariah shares and no amount can be set aside due to mere expression of wish. However if the heirs are all willing to go ahead with the wish then with the consent of all, the money could be taken out and used for the said purposes.
And Allah knows best
Darul Ifta
Darul Uloom Waqf Deoband