Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Undestroyed objects in forms
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00086484
Message ID:
00086555
Views:
32
Ed,

consider the following with my best Bill Nye voice

z1 = createobject( "form" )
z1.Show()
z2 = z1 && create a second reference to the one object
z1 = .null. && the form can't destroy because another ref exists
z2 = .null. && now the form goes away

The issue is with multiple pointers to the same object, the object can't go away until all references are gone.

>I've encountered this suggestion before, assigning NULL to an object pointer, but I've never really understood why. If the object is already gone, isn't the pointer already NULL? If it didn't destroy like it should, then am I not orphaning a piece of memory that will eventually make its way to the global OS heap and float around there until the machine is turned off?
>
>Regarding the objects themselves, I don't believe they are involved in a recursive call or cyclic relationship? In fact, the label object just 'is'...there is no code attached to it at all.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform