S
Søren Johansen
Hi,
I was wondering how to go by making classes that allocate resources such as
files, windows etc. Usually, I make a private assignment operator and copy
constructor. The reason is that I think it is unclear what should happen if
you copy a "window" class - should a copy of the actual window be made or
should the two classes manipulate the same window?
This does lead to a lot of non-copyable classes though and I am wondering if
there is a neat solution that I am unaware of?
Søren
I was wondering how to go by making classes that allocate resources such as
files, windows etc. Usually, I make a private assignment operator and copy
constructor. The reason is that I think it is unclear what should happen if
you copy a "window" class - should a copy of the actual window be made or
should the two classes manipulate the same window?
This does lead to a lot of non-copyable classes though and I am wondering if
there is a neat solution that I am unaware of?
Søren