Question

I have a need to archive an array of objects of several different types. Each object has its own instance vars.

Is it better to create singleton object with an array that holds ~20 archived objects, or have a single archived object that has an array of all the other objects? Sorry if that's confusing, but I'm a bit confused myself.

Was it helpful?

Solution

Is the array something that already exists? If so, the owner of the array of objects should archive the array.

If you just have disparate objects that need archiving you probably need to describe your architecture a bit further.

In general, the owning object would archive the instance being archived.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top