[Gambas-user] Another memory leak in gb.gtk Image
Benoît Minisini
gambas at ...1...
Sun May 9 12:12:13 CEST 2010
> (The previously mentioned memory leak was in the thread "Runaway memory
> consumption not released until program exit". That has been identified as a
> memory leak by Benoît and fixed today.)
>
> Hi Benoît,
> I have found another leak in my image processing program. I double-checked
> it by adding the suspect line to the previous test module which now looks
> like this:
> ' Gambas class file
>
> PUBLIC SUB _new()
>
> END
>
> PUBLIC SUB Form_Open()
>
> END
>
> PUBLIC SUB Quit_Click()
>
> ME.Close
>
> END
>
> PUBLIC SUB Test_Click()
> DIM n AS Integer
> DIM Frame AS NEW Image
>
> ProgressBar1.Visible = TRUE
> FOR n = 0 TO 799
> Frame = Image.Load("/home/richard/Pictures/snapshot1.png")
> Frame = Frame.Stretch(720, 576)
> ProgressBar1.Value = n / 799
> WAIT
> NEXT
> ProgressBar1.Visible = FALSE
>
> END
>
> The two "Frame = " lines may be replaced with the single line:
> Frame = Image.Load("/home/richard/Pictures/snapshot1.png").Stretch(720,
> 576) with no change to the result.
>
> Both versions of the test work perfectly using gb.qt.
>
> Sorry to take so long to discover this. It took me ages to get a working
> development environment and your bug-fixed revision running and then some
> more time to accommodate the changes (over 2.20.0) to combo box change
> event handling.
>
> Richard
>
Hi,
This is fixed in revision #2941.
Regards,
--
Benoît Minisini
More information about the User
mailing list