destroy counter break object pooling
Original Reporter info from Mantis: BeniBela @benibela
-
Reporter name: Benito van der Zander
Original Reporter info from Mantis: BeniBela @benibela
- Reporter name: Benito van der Zander
Description:
I use TInterfacedObject with an object pool. When the object is destroyed, it puts it memory back to the pool, so the next time it is created, it is created without a memory allocation and just takes its memory from the pool.
After r36757 #32168 (closed) that does not work anymore, because destroy is now only called at most once, so an object taken from the pool can never be freed again.
It should modify the reference counter for #32168 (closed), not add a second counter
Mantis conversion info:
- Mantis ID: 32353
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 37112 (#3787d52d)
- Target version: 3.2.0