Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Observer Pattern: Dangling References
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Observer Pattern: Dangling References
Miscellaneous
Thread ID:
00354611
Message ID:
00354611
Views:
75
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

Next
Reply
Map
View

Click here to load this message in the networking platform