Situation
snmesh is currently a struct containing multiple pointers to arrays of data. The memory associated with these pointers is handled outside of snmesh. This is prone to errors.
Usually snmesh is copied when returned from functions, which is sufficiently fast as only the pointers to the data is copied.
Task
Realize the memory management in snmesh and change it to a class. This requires also adapting the places where snmesh is used to avoid accidental freeing or copying of the data.
Situation
snmeshis currently a struct containing multiple pointers to arrays of data. The memory associated with these pointers is handled outside of snmesh. This is prone to errors.Usually snmesh is copied when returned from functions, which is sufficiently fast as only the pointers to the data is copied.
Task
Realize the memory management in
snmeshand change it to a class. This requires also adapting the places where snmesh is used to avoid accidental freeing or copying of the data.