I first started by not allocate anything on the heap. But it leaked memory.
So I have started to try to allocate on the heap in order to be able delete when I dont want the object anymore. It still leaked memory.
So I figured, if I allocate the element objects to, and delete them when I dont want them anymore.
I very much would like to not allocate anything on the heap, but am not sure how & were the objects goes out of scope?
Bookmarks