[Gambas-user] Runaway memory consumption not released until program exit
Richard
richard.j.walker at ...247...
Sat May 8 03:27:54 CEST 2010
> Ooops, spoke too soon. The working project
> compiles ok but breaks now where I test the presence of an object in a
> collection. Looks like the place I get the collection key is not
> initialising. It is a ComboBox which I fill in one splash with DIr(path,
> pattern, gb.File). Must be a difference in qt and gtk combo boxes.
> Shouldn't take too long to fix though.
>
Just for completeness....
The original combo box (gtk?) fires its change event when its List is set by a
string array after all of the elements of the list have been properly put in
place, counted and indexed. I can then use the change event to see if the now
current list item has been seen before, and if not I add it and its
associated object to a collection.
The qt combo box I am now using will also be quite happy to be initialised by
a string array and it duly fires off its change event. This time, however,
the count and index are not yet correct in the change event handler. They are
of course correct by the time the event returns. My horrible kludge of a fix
is to have a class boolean property called RE_RUN which I set false before I
set up the combo box and then set to true afterwards.
I re-trigger the change event with a couple of harmless index number flips.
(At worst this will add an extra object to the collection before it is
needed, but I can live with that).
The combo change event has its event analysis code wrapped in an IF statement
which tests the RE_RUN property to see if it should be executed.
There are other obvious glitches, like items hidden by overlaid widgets on the
gtk form which are now plainly visible (and in the way) on the qt version,
but that just means I was relying too much on the gui behaviour. I can fix it
be being more explicit about what should be hidden and revealed.
Is there a reference somewhere to the differences of behaviour in Gambas which
depend on the underlying gui toolkit?
Time for bed now...
Richard
More information about the User
mailing list