1
Programming / Re: Brief outline of the source
« on: May 24, 2013, 11:06:27 AM »
1. You have to increment the iterator (iter++) before you delete the object. Because the entry in the map (m_objects), which iter references, will be gone after the object was removed, thus rendering iter invalid.
2. Regarding the split in two for-loops, I believe it depends on the way updates or object destructions are handled. I assume it is necessary to delete all invalid objects (and eventually remaining references between objects), before you actually update the remaining valid elements.
protogenes
2. Regarding the split in two for-loops, I believe it depends on the way updates or object destructions are handled. I assume it is necessary to delete all invalid objects (and eventually remaining references between objects), before you actually update the remaining valid elements.
protogenes