Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory consumed when using GRID (VFP6 SP3)
Message
From
10/04/2000 19:12:27
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Memory consumed when using GRID (VFP6 SP3)
Miscellaneous
Thread ID:
00357734
Message ID:
00357734
Views:
53
In a custom GRID class I have code that changes the colour of the grid depending on the deleted status of the record and also highlights the current record. This is achieved using setall dynamicbackcolor command in the grid refresh method:
thisform.nCurRec=recno(this.recordsource)

this.SetAll("dynamicbackcolor",;
   "iif(recno() = thisform.nCurRec, ;
       iif(dele(),RGB(192,192,128),this.rowHighlightColor), ;
       iif(dele(),RGB(197,165,173),RGB(255,255,255)))", ;
    "Column")
When a form with a grid based on this class is active for a long time, it becomes apparent that RAM is being progressively consumed until it exhausts the physical RAM and starts disk swapping. I checked this by adding a textbox that displays the value of sys(1016) as the grid is refreshed, and watched the unused physical memory in the Windows System Monitor.

Removing the grid coloring code resolves the problem. Anyone know why this is happenning.
Sam Robbins BCRTC
Next
Reply
Map
View

Click here to load this message in the networking platform