Home Cannot create class in AHK after destruction
 I'm trying to wrap my head around classes in AHK. I'm C++ dev, so would like to make use of RAII (__New, __Delete), but it looks like I miss some concepts since things look very contra-intuitive for me. After some tries I came up with this simple example: class Scenario { __New() { MsgBox, NEW } __Delete() { MsgBox, DELETE } } scenario := new Scenario scenario := new Scenario scenario := 1 scenario := {} scenario := new Scenario Return  As a result I get the following messages: NEW NEW DELETE DELETE Questions: Why doesn't the object get destroyed during the second assignment? I'd assume the number of refs going to 0, no? How come I get 2 destructions in a row? Where was that object stored meanwhile? How could scenario variable hold both references? Why was not the third construction called?