-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
This is already implemented in a couple of places, but I have noticed that there are some cases where performance(mainly regarding the GC) could be better if some things are cached.
Consider this generic getter function:
const(someClass) getSomeClass()
{
return new someClass(sf_someThing_getsomeClass(sfPtr));
}
This appears quite often. But having a private "someClass" instance, it could be updated instead of returning a new instance each time, greatly reducing the number of new instances that the GC has to keep track of. SFML would return a const ref anyways, so it works basically the same.
Reactions are currently unavailable