On Mon, 11 May 2009 00:48:25 +0100, Rhodri James wrote: > On Mon, 11 May 2009 00:06:34 +0100, Tobiah <t...@tobiah.org> wrote: > > [Snippety snip] > >> I wanted the bullets to be responsible for destroying themselves, but a >> little Googling brought me to points about dangling references and how >> an object is not allowed (nor does it seem to have the means) to destroy >> itself. That's why I made this wrapper class for all of the bullets. > > An object can, however, erase its representation from the screen and tell > whatever control system is keeping track of objects to forget about it. > Once the last reference to the object is deleted, the object will be > garbage collected. > > What framework are you writing your game in? Pygame has facilities for > handling this sort of thing fairly straightforwardly.
Actually I am using Pygame, although I'm quite new to it. Which module has the facilities that you describe? Thanks, Toby -- http://mail.python.org/mailman/listinfo/python-list