No memory leak and correct random priority for RST.hpp