D
Dave
Hello all,
I am creating arbitrary trees and would like to not have to deal with memory
management. The approach I've taken is to put each node in a std::list<>.
Obviously, the nodes will be deallocated when the list is destroyed or when
I call clear(). This approach works because my nodes can have simple
pointers to parent / children / siblings since the elements in a list never
move. Can anybody see any shortcomings in this approach or offer a superior
alternative?
Thanks,
Dave
I am creating arbitrary trees and would like to not have to deal with memory
management. The approach I've taken is to put each node in a std::list<>.
Obviously, the nodes will be deallocated when the list is destroyed or when
I call clear(). This approach works because my nodes can have simple
pointers to parent / children / siblings since the elements in a list never
move. Can anybody see any shortcomings in this approach or offer a superior
alternative?
Thanks,
Dave