[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Re: [pygame] Memory leak in surfarray.pixels3d?



Ah, yes. I will look into it.
 
Lenard Lindstrom
 
On Sep 20, 2011, Christoph Gohlke <cgohlke@xxxxxxx> wrote:
Thank you. Shouldn't the reference count of the surface get decremented
when the view is deleted?

from sys import getrefcount
import pygame
pygame.init()
x = pygame.Surface((1000, 1000), pygame.SRCALPHA)
for i in range(1000):
a = pygame.surfarray.pixels3d(x)
print getrefcount(x)

1002 (expected 3)


Christoph

On 9/20/2011 9:19 PM, Lenard Lindstrom wrote:
> Fixed in changeset 7866ddf0ec0d.
>
> Lenard Lindstrom
>
>
> On Sep 20, 2011, *Lenard Lindstrom* <len-l@xxxxxxxxx> wrote:
>
> Hello,
>
> There is definitely a leak. I know the source and will commit a fix
> shortly.
>
> Lenard Lindstrom
>
> On Sep 19, 2011, *René Dudfield* <renesd@xxxxxxxxx> wrote:
>
> Hi,
>
> seems like it is in the development version of pygame. It leaks
> on OSX too with the latest pygame from hg.
>
> There is also a leak with pixels2d.
>