From: Tobias Steinrücken <t.steinruecken@xxxxxxxxxxxx>
To: pygame-users@xxxxxxxx
Sent: Tue, November 16, 2010 4:18:04 PM
Subject: [pygame] BUG: Memoryleak in pygame.sprite.GroupSingle
Hello,
for me it seems that GroupSingle dosnt release references to the old
Sprite when a new Sprite is beeing assigned.
ive attached 2 Files.
pygame_memleak.py actually triggers the leak (Dont uncomment the sleep -
it will eat your memory instantly!).
In the second file pygame_memleak2.py i just changed GroupSingle to
Group and s.sprite = ... to s.empty(); s.add( ... ) to achieve the same
behaviour as GroupSingle - and this one works fine.
Im using:
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5]
(64-Bit)
Pygame 1.9.1release
(The default Ubuntu 10.10 setup -but ive seen this on older Versions of
Python aswell)
--
Conesoft / Brose - Steinrücken GbR
Ehm. Service4every1
Flemerskamp 19 a 44319 Dortmund
Telefon: +49 (0) 231 / 108722231*
Fax: +49 (0) 231 / 283798
E-Mail:
t.steinruecken@xxxxxxxxxxxxGesellschaftsform: Gesellschaft bürgerlichen Rechts
Sitz: Dortmund
Geschäftsführer: Roland Brose, Tobias Steinrücken
USt-IdNr.: DE237763154