realbasic-nug
[Top] [All Lists]

Listbox Resize Memory Loss

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Listbox Resize Memory Loss
From: jarobe01 at athena dot louisville dot edu
Date: Tue, 30 Jul 2002 16:04:34 +0000
Summary: Listbox Resize Memory Loss
Product: REALbasic
ProductVersion: 4.5
Component: Application
Severity: Crash
CC: realbasic-nug at lists dot realsoftware dot com
Reproduce: 
Reproducible: Always
OSVersion: 8.6
CPUType: PowerPC
SubmittedOn: 
REALbugsVersion: 1.4.2
Description: Create a new project. Add a 3 column listbox with headers. Add a 2 
column listbox (no headers necessary).  

In the 3 column listbox mark the headers as resizeable and add the following to 
its cellClick event:

  dim k As Integer
  ListBox2.AddRow str(Runtime.MemoryUsed)
  k=ListBox2.LastIndex
  if k>0 then
    ListBox2.cell(k,1)=format(val(ListBox2.cell(k,0)) - 
val(ListBox2.cell(k-1,0)),"#")
  end
  ListBox2.ListIndex=k

Also in the 3 column listbox set the initial data to:

0       1       2
a       b       c
d       e       f
g       h       i

where the separators are tabs. This will populate the listbox.

Run the program, click on any cell. This will put an initial value for memory 
used into listbox2. Resize any header and click any cell; the change in memory 
used is recorded in column 2 of listbox2. Repeat the process as often as 
desired to see the memory consumed grow and never be reclaimed.

On my machine, this is about 30K-50K per resize in the IDE and 700K-900K in a 
built program and will eventually crash the program.
WorkaroundNotes: 
Workaround: 0



<Prev in Thread] Current Thread [Next in Thread>
  • Listbox Resize Memory Loss, jarobe01 <=