Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing 'this' asa parameter
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00087634
Message ID:
00087971
Views:
27
>>>I have a class based on a container. When I pass that class 'this' from the calling class and then set a property called 'oparent' in this container all is working fine until the class is destroyed. Then the parent form won't close. Any ideas?
>>>
>>>Gary
>>
>>You should 'release' reference in child object Destroy event: This.oParent=.NULL.
>
>
>Ed
>
> I thought I had tried that but I will do it again. The object is being created with the parent.Addobject() Function and destroyed
>withe the parent.RemoveObject function. Ill let you know if that
>works.
>
>thanks Gary


This still doesnt work. If I create the object in a form then
everything seem ok to put the 'this.oParent = NULL' in the
destroy event of the created class. But if I have a container
class on the form that creates the other class then that doenst
work. HELP!!!

Gary
Previous
Reply
Map
View

Click here to load this message in the networking platform