Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Collection Class Not Releaseing
Message
De
01/11/2004 11:51:42
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00956540
Message ID:
00956600
Vues:
8
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform