> "right" way of doing it But introducing the Value Type just because the destructor needs it is a bit ugly. For gintro we use code like grep -A14 "ToggleButton\* =" ~/.nimble/pkgs/gintro-#head/gintro/gtk4.nim ToggleButton* = ref object of Button when defined(gcDestructors): proc `=destroy`*(self: var typeof(ToggleButton()[])) = Run
Are there disadvantages, may ToggleButton()[] allocate a temporary object?