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:
00956728
Views:
7
Thanks Viv, that fixed the problem.

John

>Hi,
>
>
>loRecordDetails = CREATEOBJECT("Empty")
>ADDPROPERTY(loRecordDetails,"Name","")
>
>SELECT Customer
>SCAN FOR lSelect
>     loRecordDetails.Name = Customer.Name
>
>     loSelectedCustomerCollection.Add(loRecordDetails)
>ENDSCAN
>
>
>Not a factor in being unable to release the collection but I don't think you're achieving what you want here - you are just adding multiple references to the same object into the collection. Try:
>
>
>SELECT Customer
>SCAN FOR lSelect
>  loRecordDetails = CREATEOBJECT("Empty")
>  ADDPROPERTY(loRecordDetails,"Name","")
>  loRecordDetails.Name = Customer.Name
>  loSelectedCustomerCollection.Add(loRecordDetails)
>ENDSCAN
>
>
>HTH,
>Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform