Reset class member variables
dennis luehring
dl.soluz at gmx.net
Fri Sep 7 12:29:25 PDT 2007
mandel schrieb:
> Hi,
>
> I have some big classes with lots of member variables
> that need to be reset to theire initial value.
> Therefore I thought about a more reliable way to
> accomplish this, because it's hard to keep track
> of variables I have added.
> It also looks bloated to assign all values manually.
what about creating a new object everytime you need a fresh one?
i think that new is faster than reinitalise all members - and you get
rid of your track problems
(btw: the need of reseting an object could be a design problem)
ciao dennis
More information about the Digitalmars-d
mailing list