Hello. I am working on a browser. After parsing the web-page, I will be creating a class Graphic node and attaching it to the first and so on. After the user hops to another page, I will be freeing the memory of the class Graphic linked list objects, and renew the process. My question is, is this a bad idea? Would an array of Graphic objects be better since each element is reused, or will Windows be properly reclaiming the memory deallocated from the linked list version?



LinkBack URL
About LinkBacks



You should do it dynamically since static allocation has limitations to the static heap. If you make an large heap to overcome limitations you create a large memory hog that didn't need to be there in the first place. You want to avoid memory waste more than anything else.