I use the Memento Pattern to save properties of a multi-instance form, where n forms are created by user inside a parent form. The purpose of the memento is to regain the same number of forms, and their settings, when a user close and later reopen the parent form. The saving of the form mementos are done by a "save" button on the parent form. So I have two challenges..
Of course I could probably tweak this to work somehow, but I would like to know if there is a general pattern description that solves this, such that I have a firm guideline to follow.
cheers!
The default empty constructor of the memento class should be fine, or you can have a CreateDefault()
factory method, e.g., if you want to leave the default constructor to initialize a blank memento as opposed to a pre-set default configuration.
There are a number of different creational patterns you can use for specifying a custom default, including prototype and abstract factory.