Memory Management Question

Started by
2 comments, last by antareus 19 years, 3 months ago
So in the Enginuity articles, do you create a memory managed object via the memory manager. So: a) Look memory manager i would like a memory managed object of type ClassA. b) The memory manager would then create the object on the heap, the object would be pointed to by a smart pointer. c) it would then add the smartpointer to its internal list of live objects? Am i right? Other questions. 1) when it says you would run through the list of liveobject to see if the object is being used. If the object isnt being used would this be marked by a simple bool variable within the object. So if this were true you could have every object that would be on the heap derive from a base object with this variable. 2) An instance of when an object wouldn't be being used would be kinda if something on a map was destroyed, therefore invisible, or like when there is a level change or something. 3) In order for the memory manager to be able to store 1 list containing smartpointers to different types of objects, would this be done with a polymorphic collection? ace
Advertisement
noone?
bump
Yes, yes, I think so, and yes.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis

This topic is closed to new replies.

Advertisement