Struct copy and destruction
Mike Wey
mike-wey at example.com
Sat Apr 9 05:25:10 PDT 2011
On 04/09/2011 12:42 PM, Morlan wrote:
> The essence of my problem is why is the destructor called as a
> result of the assignment in the first place? There is no
> information about this behaviour in the language reference. Can
> anyone explain this?
Because you assign a copy of s2 to s1 the struct that was originally in
s1 gets has it's destructor called, sine it ceases to exist.
--
Mike Wey
More information about the Digitalmars-d
mailing list