pooling concept
by Isaac Barbosa · in Torque Game Builder · 08/08/2009 (5:03 pm) · 5 replies
Hi,
I´ve read something about pooling when creating and destroying objects on a regular basis, but I can´t understand the concept. So, will somebody be able to explain me this, how it works, and how will it affect my games?
Thanks,
Isaac
I´ve read something about pooling when creating and destroying objects on a regular basis, but I can´t understand the concept. So, will somebody be able to explain me this, how it works, and how will it affect my games?
Thanks,
Isaac
#2
08/08/2009 (5:57 pm)
what I´m doing is create objects and add to their proper SimSet, but when I need to delete them, I first remove them from the SimSet their belongs to and then I delete them using safedelete. I´m doing pooling without being aware of?
#3
The direct question is: will pooling save memory?
Take care
Isaac
08/08/2009 (5:59 pm)
Ah, Thanks Jaimi, now I understand. I think it will not be easy to do in my current game (that is now done) but I will try to see if that have some effect in saving memory.The direct question is: will pooling save memory?
Take care
Isaac
#4
Pooling doesn't save memory. It does however give you a speed boost in many instances. And as you suspected, the example you gave is not pooling.
Jaimi
08/08/2009 (8:01 pm)
@Isaac -Pooling doesn't save memory. It does however give you a speed boost in many instances. And as you suspected, the example you gave is not pooling.
Jaimi
Associate Jaimi McEntire
King of Flapjacks
A good example of pooling is "Connection Pooling" and "Thread Pooling" in the .Net framework.