Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Observer Pattern: Dangling References
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Observer Pattern: Dangling References
Divers
Thread ID:
00354611
Message ID:
00354611
Vues:
69
I'm working on an observer pattern utilizing a listbox as the subject, and custom classes (textbox & label) as observers. I'm using the following Attach method in the listbox:
lparameter oObserver

if type('This.aObservers(1)') # 'O'
	x = 1
else
	x = alen(this.aObservers) + 1
endif

dime this.aObservers(x)
this.aObservers(x) = oObserver
oObserver = .null.
I can not seem to get rid of these references. When and where should I be clearing them? I've been trying to do it in the destroy event to no avail. I must be missing something...
kenweber
GCom2 Solutions
Microsoft Certified Professional

Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform