Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why does VFP get "tired"
Message
From
24/11/2004 04:30:38
 
 
To
23/11/2004 12:15:10
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
00963765
Message ID:
00964161
Views:
20
Hi,

>>
oX = CREATEOBJECT("MyForm")
RefPage2 = oX.Pgf.P2
    *
    *
   lots of code
RELEASE oX
The actual memvar reference "oX" will disappear, but the object "oX" will remain in storage because "RefPage2" holds a reference to an object within the oX object.
Now imagine repeating that code over and over again. Soon enough you'll have multiple extraneous copies of object "oX" residng in memory.
>>

Is this true. You don't specify the scope of RefPage2 but it it's local then the reference will be released when it goes out of scope; if it's global then it will be released when RefPage2 is assigned another value.

Regards,
Viv
Previous
Reply
Map
View

Click here to load this message in the networking platform