Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collection Class Not Releaseing
Message
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00956540
Message ID:
00956566
Views:
7
Hi Mark

Here is the code creating the objects and collection. As you can see the objects added to the collection contain one property called name, which is the name from the record in the selected customer table. If more that one object is added to the collection the tables opened by the form won't close when the form is released.
loRecordDetails = CREATEOBJECT("Empty")
ADDPROPERTY(loRecordDetails,"Name","")

SELECT Customer
SCAN FOR lSelect
     loRecordDetails.Name = Customer.Name
		
     loSelectedCustomerCollection.Add(loRecordDetails)
ENDSCAN
>Yes but is any of the properties in the objects added to the collection class holding a reference to something? Maybe try to set the property or memvar that is holding your collection object reference to NULL before releasing the form.
>
>>I have creating a collection in a method of a form. If I add more than one object to it the form won't release properly. The objects added are just an empty class with one property added.
>>
>>The collection is not referenced anywhere.
>>
>>Any ideas why the form is not releasing properly?
>>
>>Thanks
>>
>>John
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform