/[gzz]/gzz/gfx/demo/memoryleak.py
ViewVC logotype

Diff of /gzz/gfx/demo/memoryleak.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by tjl, Thu Jan 30 16:45:53 2003 UTC revision 1.4 by tjl, Thu Jan 30 17:25:25 2003 UTC
# Line 23  class ViewScene: Line 23  class ViewScene:
23          self.bgcolor = (0.5, 0.4, 0.7)          self.bgcolor = (0.5, 0.4, 0.7)
24          putnoc(vs, background(self.bgcolor))          putnoc(vs, background(self.bgcolor))
25    
26          # Build 500 coordsys ;)          # Build a lot of *NON-INTERPOLATED* coordsys
27          cs_a = vs.coords.affineCoordsys(0, 10, 1,1, 1, 0, 0, 1)          cs_a = vs.coords.affineCoordsys(0, 10, 1,1, 1, 0, 0, 1)
28          for i in range(0,900):          for i in range(0,900):
29              cs_a = vs.translateCS(cs_a, "asdf"+str(i), 0,0,0)              cs_a = vs.coords.translate(cs_a, 0,0,0)
30                            
31          # The next line causes the memory leak!!!!!!!!!!          # The next line causes the memory leak!!!!!!!!!!
32            # It makes the pointwise coordsys code path
33            # used.
34          vs.matcher.add(cs_a, "A")          vs.matcher.add(cs_a, "A")
35    
36            # If the previous line is replaced by this, i.e.
37            # non-recursed cs, no problems.
38            # cs_a = vs.translateCS(0, "A", 0,0,0)
39    
40          System.gc()          System.gc()
41          # And again...          # And again...
42          GL.freeQueue()          GL.freeQueue()

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26