Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 9 Collections and memory leaks
Message
From
06/04/2017 06:33:10
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
06/04/2017 05:32:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01649799
Message ID:
01649847
Views:
53
>I am not a fan of collections and I don't use them. Arrays and custom (and mostly "Empty") object does good for me in most cases.

I use collections a lot, but for small things, order of magnitude of a couple hundred elements max. They do help in cases where the search key is a string, and aScan() would match a shorter search string in a longer one, i.e. if a[4]="abc" and a[92]="ab", ascan(a, "ab") returns 4, not 92. Not so with collections, or at least I don't have to pad the key strings.

I did have a case where I had to abandon collections and use arrays - and that was an XML builder where I used to have a collection of child elements, up to 4 or 5 levels deep. It worked fine for months in several places, until once it just stopped working for one, then another. Replaced with arrays and had no more problems.

>I chimed in to ask about that "text and xml via com parsing". That sounds to be a bigger problem. I would try keeping away from COM unless absolutely needed. Maybe you could parse via XMLAdapter and remove the need to collections completely?

AFAIK, XmlAdapter uses a COM object internally. Looks so in the debugger and intellisense.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform