Information générale
Catégorie:
Gestionnaire d'écran & Écrans
The issue you are running into....I think... is the order in which things are occurring. If you have one object reference to the contained listbox that is held by the form, then in the Form's Destroy(), setting the object property to Null should work. If it does not, you have additional object references.
Somewhere, you have a containership situation where a contained object cannot be released. As such, the container - namely the form or something else, cannot be released.
Your best bet is in the destroy() of the form, to set all off the pointers to null - no matter where they reside. From a design standpoint, this kind of sucks. If you have one object reference, which sounds like that is all you need, it should not be a problem.
>I have an object that dynamically creates headers for list boxes. This object is placed on a form, and a property (pcListBoxName) is set to be the name of the list box to manage.
>
>The object also has a property that is an object reference to the same list box (EVAL(pcListBoxName)). My problem is that the form will not release. I think I understand what is happening:
>the form release sees that there is a reference to one of the controls on the form (the list box), and therefore refuses to destroy itself.
>
>I can code around this several ways (like by not keeping that object reference and EVALing everywhere, or specifically calling destroy() of the class with the reference), but it seems like there should be a better way.
>
>Any thoughts,
>Bob
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement