[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] can someone on windows please test this for a memory leak?
- To: pygame-users@xxxxxxxx
- Subject: [pygame] can someone on windows please test this for a memory leak?
- From: René Dudfield <renesd@xxxxxxxxx>
- Date: Tue, 6 Sep 2011 16:54:10 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Tue, 06 Sep 2011 10:54:19 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=cU/3Bcwo76/b8yzlwFY1VBdGXfkeHVTI64XfPnzoeJI=; b=Rbi7dHAhvSvr3GgwVOIWqzkYw94C/EWMOMu1RjMKFrQy+raP0BbbrZwzR3W5ZyrOND T8+UciJbCfVvDjCqiyYEiz4JPi6n/h+v8MML+cNE8Gun3B+sYlPoFnoMwHsDwzH5m2lV rSdlx8xOsfOaydzTW6N3NVPzXFs17bvfzUxyc=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hello,
there is an issue here that says there is a memory leak with pygame.transform.scale on windows.
https://bitbucket.org/pygame/pygame/issue/34/memory-leak-with-pygametransform-functions
Is someone able to run this program in windows, and check in task manager if it leaks memory?
The program runs stand alone, so you should be able to just paste it into a file and run. Any help much appreciated.
cheers,
import pygame, pygame.examples, time, os
pygame.init()
main_dir = os.path.split(os.path.abspath(pygame.examples.__file__))[0]
data_dir = os.path.join(main_dir, 'data')
image_path = os.path.join(data_dir, "arraydemo.bmp")
screen = pygame.display.set_mode((640, 480), 0, 32)
slice_h = 40
test_tile = pygame.image.load(image_path).convert()
slicescaled = pygame.Surface((1, slice_h))
going = True
while going:
going = pygame.QUIT not in [e.type for e in pygame.event.get()]
screen.fill((0, 0, 0)) #clear screen
for x in xrange(100):
texoffset = x
slicepiece = pygame.Surface((1, 128))
slicepiece.blit(test_tile, (0,0), (texoffset, 0, 1, 128))
pygame.transform.scale(slicepiece, (1, slice_h), slicescaled)
screen.blit(slicescaled, (x, 10))
pygame.display.flip()
pygame.time.wait(10)
pygame.quit()