On Wed, Jun 3, 2009 at 2:58 PM, Charles Brandt <[email protected]>wrote:
> > Is there a recommended way to free resources once they are no longer > used in an application? > > I am using pyglet to show 4 images on the screen at a time. After the > user selects one, 4 new images are shown. This works well for the first > few rounds, but quickly starts to eat up large amounts of system memory > after that. > > I am loading the image with: > img = pyglet.image.load(source) > > and then creating a sprite with the image. > > I have tried: > del img > del sprite > but that doesn't seem to free up resources. Any ideas? > I would try: *img.get_texture().delete()*, but your mileage may vary... -- Tristam MacDonald http://swiftcoder.wordpress.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
