>>>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
You'll probably need to delete it in the forms .Destroy() method. It's not when you use .AddObject() and .RemoveObject(), it's when you assign the reference to a variable or property. You need to kill that too.
Steve
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only