in wxPython demo/wxTreeCtrl.py add the following line of code at the end
of TestTreeCtrlPanel __init__ function:
self.tree.SortChildren (self.root)
from now on whenever the wxTreeCtrl demo is executed, some memory is
allocated and never released. Switch multiple times between this and
other demos and watch memory growing. I reproduced this problem on
version 2.3.2.1 and 2.3.3p4 of wxPython either on Linux/GTK and on
Win2K, with the demo and with an application I'm developing.
in wxPython demo/wxTreeCtrl.py add the following line of code at the end
of TestTreeCtrlPanel __init__ function:
self.tree.SortChildren (self.root)
from now on whenever the wxTreeCtrl demo is executed, some memory is
allocated and never released. Switch multiple times between this and
other demos and watch memory growing. I reproduced this problem on
version 2.3.2.1 and 2.3.3p4 of wxPython either on Linux/GTK and on
Win2K, with the demo and with an application I'm developing.
This is probably an artifact of the demo framework when you switch demos,
and not of SortChildren. The demo already does a SortChildren if you double
click on a tree item and you can see that the process' memory does not grow
if you double click items multiple times.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
In my application using SortChildren gets the result I described: a
chunck of memory (of size dependable on number of tree items) is
permanently lost whenever the tree is created/destroyed.
Memory is lost only when the tree has/had items in it.
Seems that the tree sort functions does not deallocate memory used for
sorting.
Everything works when no item is inserted/deleted.
···
On Tue, 2002-07-02 at 19:46, Robin Dunn wrote:
> The test:
>
> in wxPython demo/wxTreeCtrl.py add the following line of code at the end
> of TestTreeCtrlPanel __init__ function:
>
> self.tree.SortChildren (self.root)
>
> from now on whenever the wxTreeCtrl demo is executed, some memory is
> allocated and never released. Switch multiple times between this and
> other demos and watch memory growing. I reproduced this problem on
> version 2.3.2.1 and 2.3.3p4 of wxPython either on Linux/GTK and on
> Win2K, with the demo and with an application I'm developing.
This is probably an artifact of the demo framework when you switch demos,
and not of SortChildren. The demo already does a SortChildren if you double
click on a tree item and you can see that the process' memory does not grow
if you double click items multiple times.
This is probably an artifact of the demo framework when you switch
demos, and not of SortChildren. The demo already does a
SortChildren >if you double click on a tree item and you can see
that the process' >memory does not grow if you double click items
multiple times.
In my application using SortChildren gets the result I described: a
chunck of memory (of size dependable on number of tree items) is
permanently lost whenever the tree is created/destroyed. Memory is
lost only when the tree has/had items in it. Seems that the tree
sort functions does not deallocate memory used for sorting.
Everything works when no item is inserted/deleted.
What about if you do or don't call SortChildren? Please reduce it to a
small sample and send it.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
hai guys thanx for previous answer for my problem it
was great!!! now I have new problem. I tried to
retrieve data from database into columns in wxListCtrl
& I used code in the demo wxListCtrl. But I bump into
a problem when settin values to the columns & this is
my code:
if 0:
# for normal simple columns, you can add
them like this:
self.list.InsertColumn(0, "ID")
self.list.InsertColumn(1, "Nama",
wxLIST_FORMAT_CENTER)
else:
# but since we want images on the column
header we have to do it the hard way:
info = wxListItem()
info.m_mask = wxLIST_MASK_TEXT |
wxLIST_MASK_FORMAT
info.m_format = 0
info.m_text = "ID"
self.list.InsertColumnInfo(0, info)
for jumlah_data in range(total):
self.list.SetStringItem(jumlah_data, 0,
nilai[jumlah_data][0])
self.list.SetStringItem(jumlah_data, 1,
nilai[jumlah_data][1])
def Kueri(self):
s = odbc.odbc('mysql/danukusmana/kam3pung')
cur = s.cursor()
cur.execute('select * from user')
rec = cur.fetchall()
return rec
please help me with this guys!!!
thanx
M. Danu F.
···
__________________________________________________
Do You Yahoo!?
Yahoo! Tech - Get in touch with the latest in technology. http://sg.tech.yahoo.com