@Dave,
your comments on smart/auto pointers via the Reference template is very interesting. let me see if I got it straight.
By using your Reference template you can dynamically allocate classes and be assured that when the reference goes out of scope the referenced class will then be deallocated - assuming there was only one reference to begin with. I assume the destructor for the Reference template class would delete the wrapped object? Is this correct??? Can I have the source to this? It might more sense if I just look at the code.
As for Design Patters, I think I need to pick up a copy. Although I have Bjarne Stroustrup's C++ book it's the 2nd edition and doesn't mention Factories or other patterns. I did however find some info on factories and the Signleton pattern and it might be useful to me. The singleton pattern makes sense as I'll be opening a set of windows and there will never be more instances of these windows open. They will also be global, the only problem is I'm not sure how to make it automatically deallocate itself in C++. Anyway, I'll have to check out that book and see what it has to offer. Off to Chapters I go! :-)
- Mike