If, at the expiration of the period in which any instrument or any provision thereof created by a trust or other legal relationship is not to be rendered invalid by the provisions of this chapter measured by actual, rather than possible, events, any of the assets which have not by the terms of the instrument become distributable or vested shall then be distributed as the court having jurisdiction directs, giving effect to the general intent of the creator of the trust or other instrument.
SDCL 43-5-6