What happens when you reassign a variable?

closed account (DEUX92yv)
If I have an instance MyClass Object, already declared and initialized, and I write over it, Object = // different MyClass object , does the deconstructor get called on the first instance before assigning the second instance to Object?

Somewhat related (but more general), if I have a statically allocated object, what is the syntax for manually calling a deconstructor? I've never seen it before; is this even possible?
try it. put an output message in the destructor and see if it gets called :)
closed account (DEUX92yv)
Answer: No. The destructor does not get called.
Topic archived. No new replies allowed.