// ----------------------------------------------------------------------------------------- // // Private API // ----------------------------------------------------------------------------------------- // /// <remarks> /// Converts an std::vector to an array, but why? /// Swig's current implementation of std::vector returns references to private memory, which /// means any value obtained from it is extremely unsafe and will cause C++ style memory errors /// if used after the vector is disposed. For safety, our API should never return a raw vector. /// </remarks> private SdfPath[] VectorToArray(SdfPathVector vec) { var ret = new SdfPath[vec.Count]; vec.CopyTo(ret); return(ret); }
public SampleCollection(Scene scene, SdfPathVector paths) { m_paths = new SdfPath[paths.Count]; paths.CopyTo(m_paths); m_scene = scene; }