RefCountedPairArray

Anything like this on the drawing board or does anyone have something to share? I’d rather use a juce version that cobble together boost and STL. I see there’s a string pair array, so it seems like the basics would be there.

Bruce

Hadn’t considered it, because I guess I’ve never needed such a thing myself. I’ll pop it on my to-do-list though.

Great, thanks. Will referencecountedobject work in a std::map? I seem to remember a lot of things won’t.

I know boost::shared_ptr will, but I’m not sure I want to deal with three platforms of boost installs.

Bruce

Scratch that. I think I’ll go for an OwnedArray sub-class with a key string array attached. Is that about the way you’d do it Jules? I see StringPair has two string array members, but it seems like that, in this case, would still require re-writing a lot of ownedarray to keep the two in sync, so making a sub-class would be easier.

I should probably have asked for an owned array, not ref counted anyway. I suppose the ‘best’ would actually be to go back to the base class and add a key set so that they all get it? Is there some way to add it to the array class and have it inactive unless needed? That way it could get access to all the array operations in order to stay in sync.

Or am I barking up the wrong tree?

Bruce