Platform environment class, vector memory leak fix