mansrz / pymt

Automatically exported from code.google.com/p/pymt
0 stars 0 forks source link

How freeing memory allocated by MTLabel? #360

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

The following code shows that memory allocated by labels is never released (you 
only need to have a look in the Windows task manager at the memory allocated by 
the Python process):

plane = MTScatterPlane() 
mylabels = []
for i in xrange(200):
    label = MTLabel(label='Hello World', pos=(i,i), font_size=i)
    plane.add_widget(label)
    mylabels.append(label)

for label in mylabels:
    plane.remove_widget(label)
    del label

runTouchApp(plane)

What is the expected output? What do you see instead?

The memory must be freed when a label is no more used; or it must be a method 
to force the de-allocation (what?). 

What version of the product are you using? On what operating system?

PyMT v0.5.1; Windows 7 (64bit)

Please provide any additional information below.
The problem does not seem to be related to the use of the internal Cache 
integrated in the MTLabel implementation (even when disabled the problem 
persists).

Original issue reported on code.google.com by ozzac...@yahoo.it on 11 Oct 2011 at 9:36