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:
00956623
Views:
8
What I wanted you to try is setting the Collection object to NULL before releasing the form to see if that resolves the problem.

>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.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform