Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collection class clarification
Message
 
 
To
06/05/2003 14:04:56
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00785502
Message ID:
00785515
Views:
12
>Does the collection class release objects automatically? It looks like it does but is this a safe assumption and I don't have to worry about dangling references/objects?

Depends on the ref count on the object in question. As your code demonstrates, if there's an outstanding ref count, then it's not released when Remove is called. However, if the collection is the only thing that has a reference to the object, then it's released when Remove is called.
Mike Stewart
Previous
Reply
Map
View

Click here to load this message in the networking platform