Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 9 Collections and memory leaks
Message
From
05/04/2017 15:19:24
 
 
To
05/04/2017 13:42:08
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01649799
Message ID:
01649817
Views:
87
Hi Marco,

Thanks for jumping in.

"When Visual FoxPro releases a collection, which contains object references, it also releases any objects in the collection if they are not referenced elsewhere. Make sure to release objects and any references to those objects from a collection before releasing the collection itself from memory."

I understand your point... However I just replaced the collection by an array. And the garbage collector started to work again. I stick to my point: there is an issue here. Does not mean that my code is perfect by the way. But the sheer substitution of the container should not impact the behaviour of the garbage collector. It clearly did. As a fox-die-hard -yep 1986 or 1987 - this is possibly one of the very few bugs I ran into.

Anyway, collections are certainly not fist class citizens as they are in python. They were a late addition to VFP. It shows. I remain thoroughly impressed by this old dog... You can't teach an old dog new tricks, as they say:)

Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform