You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a value type, Nim compier will call destructor twice, I wonder whether it's designed behaviour ? if yes, why ref object calls =destry once ?
Nim Version
Nim Compiler Version 2.1.1 [Windows: amd64]
Compiled at 2024-05-18
Copyright (c) 2006-2024 by Andreas Rumpf
active boot switches: -d:release
Current Output
a1.address = 000000DE975FF590
a2.address = 000000DE975FF570
sink starts
a2 with address 000000DE975FF570 object was destroyed!
sink ends
program end=====
with address 000000DE975FF570 object was destroyed!
empty111 with address 000000DE975FF590 object was destroyed!
Expected Output
a1.address = 000000DE975FF590
a2.address = 000000DE975FF570
sink starts
a2 with address 000000DE975FF570 object was destroyed!
sink ends
program end=====
empty111 with address 000000DE975FF590 object was destroyed!
Possible Solution
n/a
Additional Information
n/a
The text was updated successfully, but these errors were encountered:
Description
For a value type, Nim compier will call destructor twice, I wonder whether it's designed behaviour ? if yes, why ref object calls =destry once ?
Nim Version
Nim Compiler Version 2.1.1 [Windows: amd64]
Compiled at 2024-05-18
Copyright (c) 2006-2024 by Andreas Rumpf
active boot switches: -d:release
Current Output
Expected Output
Possible Solution
n/a
Additional Information
n/a
The text was updated successfully, but these errors were encountered: