erszcz / agrajag

Automatically exported from code.google.com/p/agrajag
0 stars 0 forks source link

Garbage collection of targets and owners #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When an object becomes target or owner of a weapon or other item its
reference is hold within that item. When target is destroyed its reference
hold in a weapon is not deleted thus deleting object itself is also not
possible. What is more, targeting object which does not exist in the game
anymore may cause weapon to function incorrectly.

Original issue reported on code.google.com by tomasz.szymczyszyn@gmail.com on 18 Nov 2007 at 12:37

GoogleCodeExporter commented 9 years ago
Problem fixed for ProjectileEnergyWeapons:
1. Destructible knows whether is was deleted or not
2. If weapon's target was deleted target is set to None

Problem should not exist for items with owners (gc should eliminate circularly
referenced item-owner).

Original comment by tomasz.szymczyszyn@gmail.com on 18 Nov 2007 at 1:16