I have been using a Image<Node>
as the main object to store the data for my program. It is a 2D grid of Node objects. The nodes have properties like bool Visited
, float Priority
, etc.
I often want to modify these nodes, put some of them in a vector to operate on them, pass them around, etc. Lately, it seems like some things would be easier if I had used a Image<Node*>
instead.
Is the only overhead that I would have to then iterate through the image and delete all of the nodes when the image is destructed? That is, what are positives and negatives to each approach and when would you use one over the other?
Thanks,
David