I dont really get why you manually SG_FREE/SG_MALLOC SGVector instances. The point of this data structure is to not do this.
You can just do ```m_vector=SGVector<T>(len)``` (if the length is different to before) which does exactly what you are doing with setting the length and SG_MALLOCing the memory