Skip to content

SimpleObjectIterator is 16 bytes but allocated in memory pools #843

Open
@xezon

Description

@xezon

SimpleObjectIterator is 16 bytes but allocated in memory pools. This looks like a waste of space. It could simply be used as a stack object.

...
SimpleObjectIterator *iter = ThePartitionManager->iterateObjectsInRange(
	self, visionRange, FROM_CENTER_2D, filters); // <--- this allocates 16 byte iterator. Why??????
MemoryPoolObjectHolder hold(iter);
for (Object *them = iter->first(); them; them = iter->next())
{
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    InvestigatePerformanceIs a performance concernRefactorEdits the code with insignificant behavior changes, is never user facing

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions