Hi Michael,
There should not be a need to use Execute, also it is not recommended to do so
for declaring/creating new variables during runtime (however, I admit, it can
be handy...)
When you tested with nil pointers for header and footer variables: could it be
that your object names (for header and footer) were not unique? They must be
unique for the entire form.
The object get pointer command should work for a footer/header and not return a
nil pointer, e.g. $pointerToHeader:=Object get
pointer("MyUniqueHeaderObjectName";Object named")
LISTBOX GET ARRAYS is helpful for checking the state of your variables:
http://doc.4d.com/4Dv15/4D/15.6/LISTBOX-GET-ARRAYS.301-3817874.en.html
I am using LISTBOX INSERT COLUMN with nil pointers a lot and never had problems
doing so, not in v15 and not in v16.
Best,
Olivier
|||| https://flury-software.ch/
-----Ursprüngliche Nachricht-----
Von: 4D_Tech <[email protected]> Im Auftrag von mferguson--- via
4D_Tech
Gesendet: Donnerstag, 26. Juli 2018 15:33
An: 4D iNug Technical <[email protected]>
Cc: [email protected]
Betreff: Memory leak with dynamic variables in list boxes?
Hi,
We have a memory leak in our v15.6 Windows database and have narrowed it down
to a listbox where the columns are dynamically added using LISTBOX INSERT
COLUMN.
The header and footer variables are nil pointers, in accordance with the
documentation.
And to reference these variables for the assignment of properties, per the
documentation:
$FtrVar_P:=OBJECT Get pointer(Object named;FTR_Names_aT{$Ndx})
$HdrVar_P:=OBJECT Get pointer(Object named;HDR_Names_aT{$Ndx})
However, the get object pointer above returns nil pointers, so we can’t assign
properties.
So, we set up our own variable manager that declares and reuses header and
footer variables for the listbox, using execute formula. The variable manager
has been tested and the number of variables for the form does not grow.
However, the apparent search speed preceding the display gets slower and
slower. The queries themselves are fast, but the re-display seems to be the
culprit eating up memory.
I would really appreciate any insights or solutions!!
Thanks
Michael Ferguson
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************